[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a4172278-7eca-1841-89b2-fddd72a92ba8@huawei.com>
Date: Tue, 12 Jul 2016 09:45:43 +0800
From: Chao Yu <yuchao0@...wei.com>
To: Tiezhu Yang <kernelpatch@....com>, <jaegeuk@...nel.org>
CC: <linux-kernel@...r.kernel.org>,
<linux-f2fs-devel@...ts.sourceforge.net>
Subject: Re: [f2fs-dev] [PATCH] f2fs: return proper error code
On 2016/7/11 7:20, Tiezhu Yang wrote:
> When the length of file name is more than F2FS_NAME_LEN,
Seem @name indicates a xattr/key name, not a file name.
Thanks,
> it should return -ENAMETOOLONG.
>
> Signed-off-by: Tiezhu Yang <kernelpatch@....com>
> ---
> fs/f2fs/xattr.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
> index 28a5023..b225062 100644
> --- a/fs/f2fs/xattr.c
> +++ b/fs/f2fs/xattr.c
> @@ -364,7 +364,7 @@ int f2fs_getxattr(struct inode *inode, int index, const char *name,
>
> len = strlen(name);
> if (len > F2FS_NAME_LEN)
> - return -ERANGE;
> + return -ENAMETOOLONG;
>
> base_addr = read_all_xattrs(inode, ipage);
> if (!base_addr)
> @@ -458,7 +458,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
> len = strlen(name);
>
> if (len > F2FS_NAME_LEN)
> - return -ERANGE;
> + return -ENAMETOOLONG;
>
> if (size > MAX_VALUE_LEN(inode))
> return -E2BIG;
>
Powered by blists - more mailing lists