diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2019-09-02 17:31:06 +0100 |
---|---|---|
committer | Andreas Gruenbacher <agruenba@redhat.com> | 2019-09-04 20:22:06 +0200 |
commit | 45eb05042d5667408d101a8c056f70a8e8ac27f6 (patch) | |
tree | 080cb4db4973cb944d5e2a99b9b58478001e6d6d /fs/gfs2/aops.c | |
parent | 8f0daef5f797c13d7f9bd248190933932b14df36 (diff) |
gfs2: Minor PAGE_SIZE arithmetic cleanups
Replace divisions by PAGE_SIZE with shifts by PAGE_SHIFT and similar.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/aops.c')
-rw-r--r-- | fs/gfs2/aops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/aops.c b/fs/gfs2/aops.c index f42048cc5454..b9fe975d7625 100644 --- a/fs/gfs2/aops.c +++ b/fs/gfs2/aops.c @@ -243,7 +243,7 @@ static int gfs2_write_jdata_pagevec(struct address_space *mapping, { struct inode *inode = mapping->host; struct gfs2_sbd *sdp = GFS2_SB(inode); - unsigned nrblocks = nr_pages * (PAGE_SIZE/inode->i_sb->s_blocksize); + unsigned nrblocks = nr_pages * (PAGE_SIZE >> inode->i_blkbits); int i; int ret; @@ -552,7 +552,7 @@ int gfs2_internal_read(struct gfs2_inode *ip, char *buf, loff_t *pos, unsigned size) { struct address_space *mapping = ip->i_inode.i_mapping; - unsigned long index = *pos / PAGE_SIZE; + unsigned long index = *pos >> PAGE_SHIFT; unsigned offset = *pos & (PAGE_SIZE - 1); unsigned copied = 0; unsigned amt; |