In case of memory allocation error, the return should be -ENOMEM, instead
of -ENOSPC.
Signed-off-by: Chengyu Song <csong84@gatech.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
 
        inode = hfs_new_inode(dir, &dentry->d_name, mode);
        if (!inode)
-               return -ENOSPC;
+               return -ENOMEM;
 
        res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
        if (res) {
 
        inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode);
        if (!inode)
-               return -ENOSPC;
+               return -ENOMEM;
 
        res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
        if (res) {