diff options
author | Bob Peterson <rpeterso@redhat.com> | 2012-07-20 14:05:05 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-07-20 14:15:09 -0400 |
commit | 15e1c960227dc22d976c270fc854dfe363c04bbd (patch) | |
tree | 89824d6966f1a9ff0ae8a4a889087d8d3a548371 /fs/gfs2 | |
parent | 8e2e00473598dd5379d8408cb974dade000acafc (diff) |
GFS2: Eliminate 64-bit divides
This patch removes the 64-bit divides introduced in the previous patch
in favor of shifting, so that it will compile properly on 32-bit machines.
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2')
-rw-r--r-- | fs/gfs2/file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 9f94832cefec..9aa6af13823c 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -384,7 +384,7 @@ static int gfs2_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) | |||
384 | return ret; | 384 | return ret; |
385 | 385 | ||
386 | atomic_set(&ip->i_res->rs_sizehint, | 386 | atomic_set(&ip->i_res->rs_sizehint, |
387 | PAGE_CACHE_SIZE / sdp->sd_sb.sb_bsize); | 387 | PAGE_CACHE_SIZE >> sdp->sd_sb.sb_bsize_shift); |
388 | 388 | ||
389 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); | 389 | gfs2_holder_init(ip->i_gl, LM_ST_EXCLUSIVE, 0, &gh); |
390 | ret = gfs2_glock_nq(&gh); | 390 | ret = gfs2_glock_nq(&gh); |
@@ -669,7 +669,7 @@ static ssize_t gfs2_file_aio_write(struct kiocb *iocb, const struct iovec *iov, | |||
669 | if (ret) | 669 | if (ret) |
670 | return ret; | 670 | return ret; |
671 | 671 | ||
672 | atomic_set(&ip->i_res->rs_sizehint, writesize / sdp->sd_sb.sb_bsize); | 672 | atomic_set(&ip->i_res->rs_sizehint, writesize >> sdp->sd_sb.sb_bsize_shift); |
673 | if (file->f_flags & O_APPEND) { | 673 | if (file->f_flags & O_APPEND) { |
674 | struct gfs2_holder gh; | 674 | struct gfs2_holder gh; |
675 | 675 | ||
@@ -795,7 +795,7 @@ static long gfs2_fallocate(struct file *file, int mode, loff_t offset, | |||
795 | if (unlikely(error)) | 795 | if (unlikely(error)) |
796 | goto out_uninit; | 796 | goto out_uninit; |
797 | 797 | ||
798 | atomic_set(&ip->i_res->rs_sizehint, len / sdp->sd_sb.sb_bsize); | 798 | atomic_set(&ip->i_res->rs_sizehint, len >> sdp->sd_sb.sb_bsize_shift); |
799 | 799 | ||
800 | while (len > 0) { | 800 | while (len > 0) { |
801 | if (len < bytes) | 801 | if (len < bytes) |