diff options
author | Chengyu Song <csong84@gatech.edu> | 2015-04-16 15:47:12 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-17 09:04:05 -0400 |
commit | 27a4e3884e9c6497f96cc28256c3cdaa93d4cf97 (patch) | |
tree | 6096bb5600b235e6218322deed359839919de4c0 /fs/hfsplus/dir.c | |
parent | 7ce844a20eb58c9823205e091b815163464e9d19 (diff) |
hfsplus: incorrect return value
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>
Diffstat (limited to 'fs/hfsplus/dir.c')
-rw-r--r-- | fs/hfsplus/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c index f0235c1640af..3074609befc3 100644 --- a/fs/hfsplus/dir.c +++ b/fs/hfsplus/dir.c | |||
@@ -434,7 +434,7 @@ static int hfsplus_symlink(struct inode *dir, struct dentry *dentry, | |||
434 | { | 434 | { |
435 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); | 435 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); |
436 | struct inode *inode; | 436 | struct inode *inode; |
437 | int res = -ENOSPC; | 437 | int res = -ENOMEM; |
438 | 438 | ||
439 | mutex_lock(&sbi->vh_mutex); | 439 | mutex_lock(&sbi->vh_mutex); |
440 | inode = hfsplus_new_inode(dir->i_sb, S_IFLNK | S_IRWXUGO); | 440 | 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 | { | 476 | { |
477 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); | 477 | struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb); |
478 | struct inode *inode; | 478 | struct inode *inode; |
479 | int res = -ENOSPC; | 479 | int res = -ENOMEM; |
480 | 480 | ||
481 | mutex_lock(&sbi->vh_mutex); | 481 | mutex_lock(&sbi->vh_mutex); |
482 | inode = hfsplus_new_inode(dir->i_sb, mode); | 482 | inode = hfsplus_new_inode(dir->i_sb, mode); |