Re: [PATCH] staging: lustre: use i_blocksize()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxx>
> ---
>  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
> 
> 
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux