If there aren't enough blocks in the FS to allocate all of the
hugefiles, return ENOSPC, not ENOMEM.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs_blocks = ext2fs_free_blocks_count(fs->super);
if (fs_blocks < num_slack + align)
- return ENOMEM;
+ return ENOSPC;
fs_blocks -= num_slack + align;
if (num_blocks && num_blocks > fs_blocks)
- return ENOMEM;
+ return ENOSPC;
if (num_blocks == 0 && num_files == 0)
num_files = 1;