summaryrefslogtreecommitdiffstats
path: root/fs/hfs/dir.c
diff options
context:
space:
mode:
authorChengyu Song <csong84@gatech.edu>2015-04-16 21:46:53 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 15:04:04 +0200
commit13f244852f1197b623af2d3076fae197d2e038ec (patch)
tree4fdf99a54de087f3722dc820fee748377a1eda16 /fs/hfs/dir.c
parentnilfs2: use inode_set_flags() in nilfs_set_inode_flags() (diff)
downloadlinux-13f244852f1197b623af2d3076fae197d2e038ec.tar.xz
linux-13f244852f1197b623af2d3076fae197d2e038ec.zip
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 '')
-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) {