X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fgfs2%2Frgrp.c;h=3401628d742b6cbfd5b53c9a4ed11f42d3372413;hb=6924d1ab8b7bbe5ab416713f5701b3316b2df85b;hp=7e8f0b1d6c6ea2d39cb18811a7762c1b8e15ee6c;hpb=03414e57ad9875d0c8bfa5a4a65813cb2157372e;p=linux-2.6 diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 7e8f0b1d6c..3401628d74 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c @@ -195,7 +195,7 @@ ulong_aligned: depending on architecture. I've experimented with several ways of writing this section such as using an else before the goto but this one seems to be the fastest. */ - while ((unsigned char *)plong < end - 1) { + while ((unsigned char *)plong < end - sizeof(unsigned long)) { prefetch(plong + 1); if (((*plong) & LBITMASK) != lskipval) break; @@ -1495,7 +1495,7 @@ u64 gfs2_alloc_block(struct gfs2_inode *ip, unsigned int *n) al->al_alloced += *n; - gfs2_statfs_change(sdp, 0, -*n, 0); + gfs2_statfs_change(sdp, 0, -(s64)*n, 0); gfs2_quota_change(ip, *n, ip->i_inode.i_uid, ip->i_inode.i_gid); spin_lock(&sdp->sd_rindex_spin);