On 2018/1/9 8:22, Daeho Jeong wrote:
> __vfs_removexattr() transfers "NULL" value to the setxattr handler of
> the f2fs filesystem in order to remove the extended attribute. But,
> __f2fs_setxattr() just ignores the removal request when the value of
> the extended attribute is already NULL. We have to remove the extended

How can we build such xattr entry whose value is NULL? Can you give an
reproducer example?

Thanks,

> attribute itself even if the value of that is already NULL.
> 
> Signed-off-by: Daeho Jeong <[email protected]>
> Signed-off-by: Youngjin Gil <[email protected]>
> Tested-by: Hobin Woo <[email protected]>
> ---
>  fs/f2fs/xattr.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c
> index ec8961e..2776618 100644
> --- a/fs/f2fs/xattr.c
> +++ b/fs/f2fs/xattr.c
> @@ -598,7 +598,7 @@ static int __f2fs_setxattr(struct inode *inode, int index,
>                       goto exit;
>               }
>  
> -             if (f2fs_xattr_value_same(here, value, size))
> +             if (value && f2fs_xattr_value_same(here, value, size))
>                       goto exit;
>       } else if ((flags & XATTR_REPLACE)) {
>               error = -ENODATA;
> 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to