mbox series

[v2,0/2] Update device mod time fixes

Message ID cover.1634231213.git.josef@toxicpanda.com (mailing list archive)
Headers show
Series Update device mod time fixes | expand

Message

Josef Bacik Oct. 14, 2021, 5:10 p.m. UTC
Hello,

Christoph noticed that my original fix to stop calling filp_open() when we
remove devices was wrong because ->bd_inode isn't the inode we need to be
update, it needs to be the inode that is associated with the path to the device
node.

In order to do this I need to do a kern_path() to lookup the path to that inode,
and then I need to update the time for that inode.  generic_update_time() isn't
appropriate here as it should be used by ->update_time() if at all.  Instead
export a inode_update_time() helper to do the correct thing, and use that.

This allows us to update the time properly for libblkid, and makes sure we still
have the lockdep fix that was the motivation of the original fix.  Thanks,


Josef Bacik (2):
  fs: export an inode_update_time helper
  btrfs: update device path inode time instead of bd_inode

 fs/btrfs/volumes.c | 21 +++++++++++++--------
 fs/inode.c         |  7 ++++---
 include/linux/fs.h |  2 ++
 3 files changed, 19 insertions(+), 11 deletions(-)