]> git.baikalelectronics.ru Git - kernel.git/commit
[XFS] Initialise current offset in xfs_file_readdir correctly
authorLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 21 Dec 2007 00:00:23 +0000 (11:00 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 21 Dec 2007 00:40:05 +0000 (11:40 +1100)
commit789f1ea3421d627954e02e2d3fd25ced59dfb673
tree9e497a5d4c554e2fe2575475c6b2464d5ba14e46
parent0b2f0923c84aa22aee9df1580949910b15ca08fc
[XFS] Initialise current offset in xfs_file_readdir correctly

After reading the directory contents into the temporary buffer, we grab
each dirent and pass it to filldir witht eh current offset of the dirent.
The current offset was not being set for the first dirent in the temporary
buffer, which coul dresult in bad offsets being set in the f_pos field
result in looping and duplicate entries being returned from readdir.

SGI-PV: 974905
SGI-Modid: xfs-linux-melb:xfs-kern:30282a

Signed-off-by: David Chinner <dgc@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/linux-2.6/xfs_file.c