* [PATCH] f2fs: return proper error code
@ 2016-07-10 23:20 Tiezhu Yang
2016-07-12 1:45 ` [f2fs-dev] " Chao Yu
0 siblings, 1 reply; 3+ messages in thread
From: Tiezhu Yang @ 2016-07-10 23:20 UTC (permalink / raw)
To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel
When the length of file name is more than F2FS_NAME_LEN,
it should return -ENAMETOOLONG.
Signed-off-by: Tiezhu Yang <kernelpatch@126.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;
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [f2fs-dev] [PATCH] f2fs: return proper error code
2016-07-10 23:20 [PATCH] f2fs: return proper error code Tiezhu Yang
@ 2016-07-12 1:45 ` Chao Yu
2016-07-13 0:27 ` Tiezhu Yang
0 siblings, 1 reply; 3+ messages in thread
From: Chao Yu @ 2016-07-12 1:45 UTC (permalink / raw)
To: Tiezhu Yang, jaegeuk; +Cc: linux-kernel, linux-f2fs-devel
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@126.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;
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re:Re: [f2fs-dev] [PATCH] f2fs: return proper error code
2016-07-12 1:45 ` [f2fs-dev] " Chao Yu
@ 2016-07-13 0:27 ` Tiezhu Yang
0 siblings, 0 replies; 3+ messages in thread
From: Tiezhu Yang @ 2016-07-13 0:27 UTC (permalink / raw)
To: Chao Yu; +Cc: jaegeuk, linux-kernel, linux-f2fs-devel
At 2016-07-12 09:45:43, "Chao Yu" <yuchao0@huawei.com> wrote:
>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.
Yes, you are right. Sorry for the noise.
Thanks,
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-07-13 1:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-10 23:20 [PATCH] f2fs: return proper error code Tiezhu Yang
2016-07-12 1:45 ` [f2fs-dev] " Chao Yu
2016-07-13 0:27 ` Tiezhu Yang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).