aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_leaf.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2009-11-03 15:14:39 -0500
committerJens Axboe <jens.axboe@oracle.com>2009-11-03 15:14:39 -0500
commit2058297d2d045cb57138c33b87cfabcc80e65186 (patch)
tree7ccffd0e162cbd7471f643561e79f23abb989a62 /fs/xfs/xfs_dir2_leaf.c
parent150e6c67f4bf6ab51e62defc41bd19a2eefe5709 (diff)
parent4b27e1bb442e964903f8a3fa6bdf33a602dc0941 (diff)
Merge branch 'for-linus' into for-2.6.33
Conflicts: block/cfq-iosched.c Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_leaf.c')
-rw-r--r--fs/xfs/xfs_dir2_leaf.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_leaf.c b/fs/xfs/xfs_dir2_leaf.c
index fa913e459442..41ad537c49e9 100644
--- a/fs/xfs/xfs_dir2_leaf.c
+++ b/fs/xfs/xfs_dir2_leaf.c
@@ -854,6 +854,7 @@ xfs_dir2_leaf_getdents(
854 */ 854 */
855 ra_want = howmany(bufsize + mp->m_dirblksize, 855 ra_want = howmany(bufsize + mp->m_dirblksize,
856 mp->m_sb.sb_blocksize) - 1; 856 mp->m_sb.sb_blocksize) - 1;
857 ASSERT(ra_want >= 0);
857 858
858 /* 859 /*
859 * If we don't have as many as we want, and we haven't 860 * If we don't have as many as we want, and we haven't
@@ -1088,7 +1089,8 @@ xfs_dir2_leaf_getdents(
1088 */ 1089 */
1089 ptr += length; 1090 ptr += length;
1090 curoff += length; 1091 curoff += length;
1091 bufsize -= length; 1092 /* bufsize may have just been a guess; don't go negative */
1093 bufsize = bufsize > length ? bufsize - length : 0;
1092 } 1094 }
1093 1095
1094 /* 1096 /*