lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.20.1701202333330.11070@casper.infradead.org>
Date:   Fri, 20 Jan 2017 23:34:15 +0000 (GMT)
From:   James Simmons <jsimmons@...radead.org>
To:     Geliang Tang <geliangtang@...il.com>
cc:     Oleg Drokin <oleg.drokin@...el.com>,
        Andreas Dilger <andreas.dilger@...el.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        lustre-devel@...ts.lustre.org, devel@...verdev.osuosl.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] staging: lustre: use i_blocksize()


> Since i_blocksize() helper has been defined in fs.h, use it instead
> of open-coding.

The i_blocksize() work hasn't landed to the staging-next tree
so this can't land just yet.
 
> Signed-off-by: Geliang Tang <geliangtang@...il.com>
> ---
>  drivers/staging/lustre/lustre/llite/file.c    | 2 +-
>  drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c
> index d93f06a..3ee546f 100644
> --- a/drivers/staging/lustre/lustre/llite/file.c
> +++ b/drivers/staging/lustre/lustre/llite/file.c
> @@ -2967,7 +2967,7 @@ int ll_getattr(struct vfsmount *mnt, struct dentry *de, struct kstat *stat)
>  	stat->atime = inode->i_atime;
>  	stat->mtime = inode->i_mtime;
>  	stat->ctime = inode->i_ctime;
> -	stat->blksize = 1 << inode->i_blkbits;
> +	stat->blksize = i_blocksize(inode);
>  
>  	stat->nlink = inode->i_nlink;
>  	stat->size = i_size_read(inode);
> diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c
> index b1dfa16..b9be7db 100644
> --- a/drivers/staging/lustre/lustre/obdclass/obdo.c
> +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c
> @@ -84,7 +84,7 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid)
>  		newvalid |= OBD_MD_FLBLOCKS;
>  	}
>  	if (valid & OBD_MD_FLBLKSZ) {   /* optimal block size */
> -		dst->o_blksize = 1 << src->i_blkbits;
> +		dst->o_blksize = i_blocksize(src);
>  		newvalid |= OBD_MD_FLBLKSZ;
>  	}
>  	if (valid & OBD_MD_FLTYPE) {
> -- 
> 2.9.3
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ