mirror of
https://github.com/crash-utility/crash
synced 2025-02-01 05:43:04 +00:00
Deprecate the "mount -f" option for Linux 3.13 and later kernels
containing commit eee5cc2702929fd41cce28058dc6d6717f723f87, which removed the super_block.s_files list_head member and the open files list that it contained. Without the patch, the command option fails with the error message "mount: invalid structure member offset: super_block_s_files" (anderson@redhat.com)
This commit is contained in:
parent
683ae262f4
commit
5094787767
15
filesys.c
15
filesys.c
@ -1372,12 +1372,19 @@ show_mounts(ulong one_vfsmount, int flags, struct task_context *namespace_contex
|
||||
if (flags == 0)
|
||||
fprintf(fp, "%s", mount_hdr);
|
||||
|
||||
if ((flags & MOUNT_PRINT_FILES) &&
|
||||
(sb_s_files = OFFSET(super_block_s_files)) == INVALID_OFFSET) {
|
||||
sb_s_files = VALID_MEMBER(super_block_s_files) ?
|
||||
OFFSET(super_block_s_files) : INVALID_OFFSET;
|
||||
|
||||
if ((flags & MOUNT_PRINT_FILES) && (sb_s_files == INVALID_OFFSET)) {
|
||||
/*
|
||||
* No open files list in super_block (2.2).
|
||||
* Use inuse_filps list instead.
|
||||
* super_block.s_files deprecated
|
||||
*/
|
||||
if (!kernel_symbol_exists("inuse_filps"))
|
||||
option_not_supported('f');
|
||||
/*
|
||||
* No open files list in super_block (2.2).
|
||||
* Use inuse_filps list instead.
|
||||
*/
|
||||
dentry_list = create_dentry_array(symbol_value("inuse_filps"),
|
||||
&cnt);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user