lkml.org 
[lkml]   [2020]   [Nov]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] fs/stat: set attributes_mask for STATX_ATTR_DAX
From
Date
Hi,

I don't know this code, but:

On 11/20/20 4:33 PM, XiaoLi Feng wrote:
> From: Xiaoli Feng <fengxiaoli0714@gmail.com>
>
> keep attributes and attributes_mask are consistent for
> STATX_ATTR_DAX.
> ---
> fs/stat.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/fs/stat.c b/fs/stat.c
> index dacecdda2e79..914a61d256b0 100644
> --- a/fs/stat.c
> +++ b/fs/stat.c
> @@ -82,7 +82,7 @@ int vfs_getattr_nosec(const struct path *path, struct kstat *stat,
>
> if (IS_DAX(inode))
> stat->attributes |= STATX_ATTR_DAX;
> -
> + stat->attributes_mask |= STATX_ATTR_DAX;

Why shouldn't that be:

if (IS_DAX(inode))
stat->attributes_mask |= STATX_ATTR_DAX;

or combine them, like this:

if (IS_DAX(inode)) {
stat->attributes |= STATX_ATTR_DAX;
stat->attributes_mask |= STATX_ATTR_DAX;
}


and no need to delete that blank line.

> if (inode->i_op->getattr)
> return inode->i_op->getattr(path, stat, request_mask,
> query_flags);
>

thanks.
--
~Randy

\
 
 \ /
  Last update: 2020-11-21 01:59    [W:0.099 / U:0.372 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site