From 2bc5565286121d2a77ccd728eb3484dff2035b58 Mon Sep 17 00:00:00 2001 From: Alexander Block Date: Fri, 15 Jun 2012 09:49:33 +0200 Subject: Btrfs: don't update atime on RO subvolumes Before the update_time inode operation was indroduced, it was not possible to prevent updates of atime on RO subvolumes. VFS was only able to check for RO on the mount, but did not know anything about btrfs subvolumes. btrfs_update_time does now check if the root is RO and skip updating of times. Signed-off-by: Alexander Block --- fs/inode.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs/inode.c') diff --git a/fs/inode.c b/fs/inode.c index c99163b1b31..033529ecd24 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -1551,6 +1551,8 @@ void touch_atime(struct path *path) * Btrfs), but since we touch atime while walking down the path we * really don't care if we failed to update the atime of the file, * so just ignore the return value. + * We may also fail on filesystems that have the ability to make parts + * of the fs read only, e.g. subvolumes in Btrfs. */ update_time(inode, &now, S_ATIME); mnt_drop_write(mnt); -- cgit v1.2.3