summaryrefslogtreecommitdiff
path: root/fs/hfs/dir.c
diff options
context:
space:
mode:
authorChengyu Song <csong84@gatech.edu>2015-04-16 12:46:53 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:04:04 -0400
commit13f244852f1197b623af2d3076fae197d2e038ec (patch)
tree4fdf99a54de087f3722dc820fee748377a1eda16 /fs/hfs/dir.c
parentfaea2c5311e162f5ceda8e0a261a9f9ece6f921d (diff)
hfs: incorrect return values
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>
Diffstat (limited to 'fs/hfs/dir.c')
-rw-r--r--fs/hfs/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/hfs/dir.c b/fs/hfs/dir.c
index 145566851e7a..36d1a6ae7655 100644
--- a/fs/hfs/dir.c
+++ b/fs/hfs/dir.c
@@ -197,7 +197,7 @@ static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
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) {
@@ -226,7 +226,7 @@ static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
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) {