[Devel] [PATCH RH7] pfcache: fix misplaced endline in ext4_xattr_trusted_csum_list

Kirill Tkhai ktkhai at virtuozzo.com
Mon Sep 26 06:21:19 PDT 2016


On 26.09.2016 15:53, Pavel Tikhomirov wrote:
> It is the fix for commit 00ebb1860eff ("pfcache: hide
> trusted.pfcache from listxattr")
> 
> Else entries in list are not separated and getfattr fails:
> 
> getfattr -d -m trusted /vz/root/110/testfile
> vz/root/110/testfile: trusted.pfcache�trusted.test: No such attribute
> 
> https://jira.sw.ru/browse/PSBM-52574
> Signed-off-by: Pavel Tikhomirov <ptikhomirov at virtuozzo.com>

Acked-by: Kirill Tkhai <ktkhai at virtuozzo.com>

> ---
>  fs/ext4/pfcache.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/ext4/pfcache.c b/fs/ext4/pfcache.c
> index 52bd886..256d2a7 100644
> --- a/fs/ext4/pfcache.c
> +++ b/fs/ext4/pfcache.c
> @@ -776,7 +776,7 @@ ext4_xattr_trusted_csum_list(struct dentry *dentry, char *list, size_t list_size
>  
>  	if (list && len <= list_size) {
>  		memcpy(list, XATTR_TRUSTED_CSUM_PREFIX, XATTR_TRUSTED_CSUM_PREFIX_LEN);
> -		list[len] = '\0';
> +		list[XATTR_TRUSTED_CSUM_PREFIX_LEN] = '\0';
>  	}
>  	return len;
>  }
> 


More information about the Devel mailing list