aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_dir2_sf.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/xfs_dir2_sf.c')
-rw-r--r--fs/xfs/xfs_dir2_sf.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/fs/xfs/xfs_dir2_sf.c b/fs/xfs/xfs_dir2_sf.c
index 182c70315ad1..919d275a1cef 100644
--- a/fs/xfs/xfs_dir2_sf.c
+++ b/fs/xfs/xfs_dir2_sf.c
@@ -752,7 +752,7 @@ xfs_dir2_sf_getdents(
752#if XFS_BIG_INUMS 752#if XFS_BIG_INUMS
753 ino += mp->m_inoadd; 753 ino += mp->m_inoadd;
754#endif 754#endif
755 if (filldir(dirent, ".", 1, dotdot_offset, ino, DT_DIR)) { 755 if (filldir(dirent, ".", 1, dot_offset, ino, DT_DIR)) {
756 *offset = dot_offset; 756 *offset = dot_offset;
757 return 0; 757 return 0;
758 } 758 }
@@ -762,13 +762,11 @@ xfs_dir2_sf_getdents(
762 * Put .. entry unless we're starting past it. 762 * Put .. entry unless we're starting past it.
763 */ 763 */
764 if (*offset <= dotdot_offset) { 764 if (*offset <= dotdot_offset) {
765 off = xfs_dir2_db_off_to_dataptr(mp, mp->m_dirdatablk,
766 XFS_DIR2_DATA_FIRST_OFFSET);
767 ino = xfs_dir2_sf_get_inumber(sfp, &sfp->hdr.parent); 765 ino = xfs_dir2_sf_get_inumber(sfp, &sfp->hdr.parent);
768#if XFS_BIG_INUMS 766#if XFS_BIG_INUMS
769 ino += mp->m_inoadd; 767 ino += mp->m_inoadd;
770#endif 768#endif
771 if (filldir(dirent, "..", 2, off, ino, DT_DIR)) { 769 if (filldir(dirent, "..", 2, dotdot_offset, ino, DT_DIR)) {
772 *offset = dotdot_offset; 770 *offset = dotdot_offset;
773 return 0; 771 return 0;
774 } 772 }
@@ -793,8 +791,7 @@ xfs_dir2_sf_getdents(
793#endif 791#endif
794 792
795 if (filldir(dirent, sfep->name, sfep->namelen, 793 if (filldir(dirent, sfep->name, sfep->namelen,
796 off + xfs_dir2_data_entsize(sfep->namelen), 794 off, ino, DT_UNKNOWN)) {
797 ino, DT_UNKNOWN)) {
798 *offset = off; 795 *offset = off;
799 return 0; 796 return 0;
800 } 797 }