mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-03 12:52:52 +00:00
[XFS] Put the correct offset in dirent d_off
The recent filldir regression fix was not putting the correct d_off in each dirent. This was resulting in incorrect cookies being passed to dmapi ioctls and the wrong offset appearing in the dirents. readdir was unaffected as the filp->f_pos was being updated with the correct offset and this was being written into the last dirent in each buffer. Fix the XFS code to do the right thing. SGI-PV: 973746 SGI-Modid: xfs-linux-melb:xfs-kern:30240a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
This commit is contained in:
parent
c734c79bc3
commit
041388b54e
4 changed files with 8 additions and 13 deletions
|
@ -1091,7 +1091,7 @@ xfs_dir2_leaf_getdents(
|
|||
* Won't fit. Return to caller.
|
||||
*/
|
||||
if (filldir(dirent, dep->name, dep->namelen,
|
||||
xfs_dir2_byte_to_dataptr(mp, curoff + length),
|
||||
xfs_dir2_byte_to_dataptr(mp, curoff),
|
||||
ino, DT_UNKNOWN))
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue