mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
fs: add i_blocksize()
Replace all 1 << inode->i_blkbits and (1 << inode->i_blkbits) in fs branch. This patch also fixes multiple checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Thanks to Andrew Morton for suggesting more appropriate function instead of macro. [[email protected]: truncate: use i_blocksize()] Link: http://lkml.kernel.org/r/9c8b2cd83c8f5653805d43debde9fa8817e02fc4.1484895804.git.geliangtang@gmail.com Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Fabian Frederick <[email protected]> Signed-off-by: Geliang Tang <[email protected]> Cc: Alexander Viro <[email protected]> Cc: Ross Zwisler <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
d317120097
commit
93407472a2
27 changed files with 56 additions and 51 deletions
|
|
@ -24,7 +24,7 @@ nfsd4_block_proc_layoutget(struct inode *inode, const struct svc_fh *fhp,
|
|||
{
|
||||
struct nfsd4_layout_seg *seg = &args->lg_seg;
|
||||
struct super_block *sb = inode->i_sb;
|
||||
u32 block_size = (1 << inode->i_blkbits);
|
||||
u32 block_size = i_blocksize(inode);
|
||||
struct pnfs_block_extent *bex;
|
||||
struct iomap iomap;
|
||||
u32 device_generation = 0;
|
||||
|
|
@ -181,7 +181,7 @@ nfsd4_block_proc_layoutcommit(struct inode *inode,
|
|||
int nr_iomaps;
|
||||
|
||||
nr_iomaps = nfsd4_block_decode_layoutupdate(lcp->lc_up_layout,
|
||||
lcp->lc_up_len, &iomaps, 1 << inode->i_blkbits);
|
||||
lcp->lc_up_len, &iomaps, i_blocksize(inode));
|
||||
if (nr_iomaps < 0)
|
||||
return nfserrno(nr_iomaps);
|
||||
|
||||
|
|
@ -375,7 +375,7 @@ nfsd4_scsi_proc_layoutcommit(struct inode *inode,
|
|||
int nr_iomaps;
|
||||
|
||||
nr_iomaps = nfsd4_scsi_decode_layoutupdate(lcp->lc_up_layout,
|
||||
lcp->lc_up_len, &iomaps, 1 << inode->i_blkbits);
|
||||
lcp->lc_up_len, &iomaps, i_blocksize(inode));
|
||||
if (nr_iomaps < 0)
|
||||
return nfserrno(nr_iomaps);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue