From: Chris Mason Date: Tue, 29 Jan 2008 14:10:26 +0000 (-0500) Subject: Btrfs: Force f_pos to the max when a readdir hits the end of the directory. X-Git-Tag: v2.6.29-rc1~27^2~9^2~55^2~56^2~30^2~319 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c2a8b6e11009398ca9363d8ba8d4e7e40fb897fd;p=linux-2.6-omap-h63xx.git Btrfs: Force f_pos to the max when a readdir hits the end of the directory. Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 16d3aef45d1..026bc9c4c90 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -1430,7 +1430,7 @@ read_dir_items: di = (struct btrfs_dir_item *)((char *)di + di_len); } } - filp->f_pos++; + filp->f_pos = INT_LIMIT(typeof(filp->f_pos)); nopos: ret = 0; err: