hfsplus: incorrect return value
authorChengyu Song <csong84@gatech.edu>
Thu, 16 Apr 2015 19:47:12 +0000 (12:47 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 17 Apr 2015 13:04:05 +0000 (09:04 -0400)
In case of memory allocation error, the return should be -ENOMEM, instead
of -ENOSPC.

Signed-off-by: Chengyu Song <csong84@gatech.edu>
Reviewed-by: Sergei Antonov <saproj@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/hfsplus/dir.c

index f0235c1640af7ec29edb92541f66dfc739c9b0db..3074609befc312443a705a14b4d7486872dcef33 100644 (file)
@@ -434,7 +434,7 @@ static int hfsplus_symlink(struct inode *dir, struct dentry *dentry,
 {
        struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
        struct inode *inode;
-       int res = -ENOSPC;
+       int res = -ENOMEM;
 
        mutex_lock(&sbi->vh_mutex);
        inode = hfsplus_new_inode(dir->i_sb, S_IFLNK | S_IRWXUGO);
@@ -476,7 +476,7 @@ static int hfsplus_mknod(struct inode *dir, struct dentry *dentry,
 {
        struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
        struct inode *inode;
-       int res = -ENOSPC;
+       int res = -ENOMEM;
 
        mutex_lock(&sbi->vh_mutex);
        inode = hfsplus_new_inode(dir->i_sb, mode);