diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c index eef453adbc0698ace23640ddf6cc98fd4bdc3d42..0debaeb70f2a8e899b502724327eefea54a587ed 100644 --- a/fs/xfs/xfs_aops.c +++ b/fs/xfs/xfs_aops.c @@ -111,11 +111,11 @@ xfs_finish_page_writeback( bsize = bh->b_size; do { + if (off > end) + break; next = bh->b_this_page; if (off < bvec->bv_offset) goto next_bh; - if (off > end) - break; bh->b_end_io(bh, !error); next_bh: off += bsize;