Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318833
b: refs/heads/master
c: 2bc5565
h: refs/heads/master
i:
  318831: 1e8ba6f
v: v3
  • Loading branch information
Alexander Block authored and Chris Mason committed Jul 23, 2012
1 parent 45c014c commit f8d1648
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 063849eafda03edf6872a3728b4a98dcc86290c7
refs/heads/master: 2bc5565286121d2a77ccd728eb3484dff2035b58
5 changes: 5 additions & 0 deletions trunk/fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -4518,6 +4518,11 @@ int btrfs_dirty_inode(struct inode *inode)
static int btrfs_update_time(struct inode *inode, struct timespec *now,
int flags)
{
struct btrfs_root *root = BTRFS_I(inode)->root;

if (btrfs_root_readonly(root))
return -EROFS;

if (flags & S_VERSION)
inode_inc_iversion(inode);
if (flags & S_CTIME)
Expand Down
2 changes: 2 additions & 0 deletions trunk/fs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f8d1648

Please sign in to comment.