aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a7d1921ac76b..fcc65802f367 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -4518,6 +4518,11 @@ int btrfs_dirty_inode(struct inode *inode)
4518static int btrfs_update_time(struct inode *inode, struct timespec *now, 4518static int btrfs_update_time(struct inode *inode, struct timespec *now,
4519 int flags) 4519 int flags)
4520{ 4520{
4521 struct btrfs_root *root = BTRFS_I(inode)->root;
4522
4523 if (btrfs_root_readonly(root))
4524 return -EROFS;
4525
4521 if (flags & S_VERSION) 4526 if (flags & S_VERSION)
4522 inode_inc_iversion(inode); 4527 inode_inc_iversion(inode);
4523 if (flags & S_CTIME) 4528 if (flags & S_CTIME)