]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libfrog: pass mode to xfrog_file_setattr
authorDarrick J. Wong <djwong@kernel.org>
Tue, 23 Sep 2025 17:10:27 +0000 (10:10 -0700)
committerAndrey Albershteyn <aalbersh@kernel.org>
Thu, 25 Sep 2025 09:18:10 +0000 (11:18 +0200)
commite51aa35ec4c8da806f6dc79a2eb03abae7ef99da
tree652a2924645ec854b84b0868fa6bf00f992c7a07
parentadd1e9d2f576a3222faba16a11868eb178d2ba86
libfrog: pass mode to xfrog_file_setattr

xfs/633 crashes rdump_fileattrs_path passes a NULL struct stat pointer
and then the fallback code dereferences it to get the file mode.
Instead, let's just pass the stat mode directly to it, because that's
the only piece of information that it needs.

Fixes: 128ac4dadbd633 ("xfs_db: use file_setattr to copy attributes on special files with rdump")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Andrey Albershteyn <aalbersh@kernel.org>
db/rdump.c
io/attr.c
libfrog/file_attr.c
libfrog/file_attr.h
quota/project.c