]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/gfs2/aops.c
docs: driver-api: pti_intel_mid: Enable syntax highlighting for C code block
[linux.git] / fs / gfs2 / aops.c
index f42048cc54549e62fe0d373170df3fac9e46e4ff..b9fe975d7625a2b5c4d3e840e30c92a7d5abce70 100644 (file)
@@ -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;