diff options
author | Miao Xie <miaox@cn.fujitsu.com> | 2012-11-26 03:43:45 -0500 |
---|---|---|
committer | Chris Mason <chris.mason@fusionio.com> | 2012-12-16 20:46:09 -0500 |
commit | 198605a8e2077f174c9834c97b836f535e4e56dd (patch) | |
tree | 1dae7f3529ead027b13ae4737f5b5cedb267d3a0 /lib/rwsem-spinlock.c | |
parent | 3c04ce01053413007b9df88313b8b8e17272b57b (diff) |
Btrfs: get write access when doing resize fs
Steps to reproduce:
# mkfs.btrfs <partition>
# mount -o ro <partition> <mnt0>
# mount -o ro <partition> <mnt1>
# mount -o remount,rw <mnt0>
# umount <mnt0>
# btrfs fi resize 10g <mnt1>
We re-sized a R/O filesystem. The reason is that we just check the R/O flag
of the super block object. It is not enough, because the kernel may set the
R/O flag only for the mount point. We need invoke mnt_want_write_file() to
do a full check.
Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Diffstat (limited to 'lib/rwsem-spinlock.c')
0 files changed, 0 insertions, 0 deletions