Commit 13f24485 authored by Chengyu Song's avatar Chengyu Song Committed by Linus Torvalds

hfs: incorrect return values

In case of memory allocation error, the return should be -ENOMEM, instead
of -ENOSPC.
Signed-off-by: default avatarChengyu Song <csong84@gatech.edu>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent faea2c53
...@@ -197,7 +197,7 @@ static int hfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, ...@@ -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); inode = hfs_new_inode(dir, &dentry->d_name, mode);
if (!inode) if (!inode)
return -ENOSPC; return -ENOMEM;
res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
if (res) { if (res) {
...@@ -226,7 +226,7 @@ static int hfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -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); inode = hfs_new_inode(dir, &dentry->d_name, S_IFDIR | mode);
if (!inode) if (!inode)
return -ENOSPC; return -ENOMEM;
res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode); res = hfs_cat_create(inode->i_ino, dir, &dentry->d_name, inode);
if (res) { if (res) {
......
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