aboutsummaryrefslogtreecommitdiffstats
path: root/fs/hfs
diff options
context:
space:
mode:
authorChengyu Song <csong84@gatech.edu>2015-04-16 15:46:53 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2015-04-17 09:04:04 -0400
commit13f244852f1197b623af2d3076fae197d2e038ec (patch)
tree4fdf99a54de087f3722dc820fee748377a1eda16 /fs/hfs
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')
-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,
197 197
198 inode = hfs_new_inode(dir, &dentry->d_name, mode); 198 inode = hfs_new_inode(dir, &dentry->d_name, mode);
199 if (!inode) 199 if (!inode)
200 return -ENOSPC; 200 return -ENOMEM;
201 201
202 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); 202 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
203 if (res) { 203 if (res) {
@@ -226,7 +226,7 @@ static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
226 226
227 inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode); 227 inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode);
228 if (!inode) 228 if (!inode)
229 return -ENOSPC; 229 return -ENOMEM;
230 230
231 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); 231 res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
232 if (res) { 232 if (res) {