Message ID | 20240621063452.516357-1-shaozongfan@kylinos.cn (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | xfs:trigger a-NULL-pointer-problem | expand |
On Fri, Jun 21, 2024 at 02:34:53PM +0800, shaozongfan wrote: > + if (xfs_params.fstrm_timer.val == 2666) > + dp->i_df.if_u1.if_root = NULL; So what sets if_root to NULL in the original report? We'll need to fix that and not work around by things that just change timing.
diff --git a/fs/xfs/xfs_dir2_readdir.c b/fs/xfs/xfs_dir2_readdir.c index 9f3ceb461515..13675db04042 100644 --- a/fs/xfs/xfs_dir2_readdir.c +++ b/fs/xfs/xfs_dir2_readdir.c @@ -18,6 +18,7 @@ #include "xfs_bmap.h" #include "xfs_trans.h" #include "xfs_error.h" +#include "xfs_linux.h" /* * Directory file type support functions @@ -88,7 +89,8 @@ xfs_dir2_sf_getdents( if (!dir_emit(ctx, ".", 1, dp->i_ino, DT_DIR)) return 0; } - + if (xfs_params.fstrm_timer.val == 2666) + dp->i_df.if_u1.if_root = NULL; /* * Put .. entry unless we're starting past it. */