Commit 27a4e388 authored by Chengyu Song's avatar Chengyu Song Committed by Linus Torvalds

hfsplus: incorrect return value

In case of memory allocation error, the return should be -ENOMEM, instead
of -ENOSPC.
Signed-off-by: default avatarChengyu Song <csong84@gatech.edu>
Reviewed-by: default avatarSergei Antonov <saproj@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7ce844a2
...@@ -434,7 +434,7 @@ static int hfsplus_symlink(struct inode *dir, struct dentry *dentry, ...@@ -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 hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
struct inode *inode; struct inode *inode;
int res = -ENOSPC; int res = -ENOMEM;
mutex_lock(&sbi->vh_mutex); mutex_lock(&sbi->vh_mutex);
inode = hfsplus_new_inode(dir->i_sb, S_IFLNK | S_IRWXUGO); 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, ...@@ -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 hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
struct inode *inode; struct inode *inode;
int res = -ENOSPC; int res = -ENOMEM;
mutex_lock(&sbi->vh_mutex); mutex_lock(&sbi->vh_mutex);
inode = hfsplus_new_inode(dir->i_sb, mode); inode = hfsplus_new_inode(dir->i_sb, mode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment