lkml.org 
[lkml]   [2015]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/1] hfsplus: incorrect return value
From
Reviewed-by: Sergei Antonov <saproj@gmail.com>

CC-ing Andrew Morton.

On 25 March 2015 at 01:44, Chengyu Song <csong84@gatech.edu> wrote:
> In case of memory allocation error, the return should be -ENOMEM,
> instead of -ENOSPC.
>
> Signed-off-by: Chengyu Song <csong84@gatech.edu>
> ---
> fs/hfsplus/dir.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/hfsplus/dir.c b/fs/hfsplus/dir.c
> index f0235c1..3074609 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,
> {
> struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
> struct inode *inode;
> - int res = -ENOSPC;
> + int res = -ENOMEM;
>
> mutex_lock(&sbi->vh_mutex);
> 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,
> {
> struct hfsplus_sb_info *sbi = HFSPLUS_SB(dir->i_sb);
> struct inode *inode;
> - int res = -ENOSPC;
> + int res = -ENOMEM;
>
> mutex_lock(&sbi->vh_mutex);
> inode = hfsplus_new_inode(dir->i_sb, mode);
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html


\
 
 \ /
  Last update: 2015-03-25 16:41    [W:0.055 / U:1.532 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site