Skip to content
Commit 54fde91f authored by Josef Bacik's avatar Josef Bacik Committed by David Sterba
Browse files

btrfs: update device path inode time instead of bd_inode



Christoph pointed out that I'm updating bdev->bd_inode for the device
time when we remove block devices from a btrfs file system, however this
isn't actually exposed to anything.  The inode we want to update is the
one that's associated with the path to the device, usually on devtmpfs,
so that blkid notices the difference.

We still don't want to do the blkdev_open, so use kern_path() to get the
path to the given device and do the update time on that inode.

Fixes: 8f96a5bf ("btrfs: update the bdev time directly when closing")
Reported-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJosef Bacik <josef@toxicpanda.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent e60feb44
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment