summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/struct-funcs.c
diff options
context:
space:
mode:
authorLiu Bo <liubo2009@cn.fujitsu.com>2012-06-29 03:58:49 -0600
committerChris Mason <chris.mason@fusionio.com>2012-07-23 16:27:58 -0400
commitb9ca0664dc806ba70587f6f3202b60dc736cd6e5 (patch)
treefd40828d3af0ba3b16e1e9231c406d6a6b1bace4 /fs/btrfs/struct-funcs.c
parente54bfa31044d602a57d4e190f6d1c3763ea76bfe (diff)
downloadblackbird-op-linux-b9ca0664dc806ba70587f6f3202b60dc736cd6e5.tar.gz
blackbird-op-linux-b9ca0664dc806ba70587f6f3202b60dc736cd6e5.zip
Btrfs: do not set subvolume flags in readonly mode
$ mkfs.btrfs /dev/sdb7 $ btrfstune -S1 /dev/sdb7 $ mount /dev/sdb7 /mnt/btrfs mount: block device /dev/sdb7 is write-protected, mounting read-only $ btrfs dev add /dev/sdb8 /mnt/btrfs/ Now we get a btrfs in which mnt flags has readonly but sb flags does not. So for those ioctls that only check sb flags with MS_RDONLY, it is going to be a problem. Setting subvolume flags is such an ioctl, we should use mnt_want_write_file() to check RO flags. Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Diffstat (limited to 'fs/btrfs/struct-funcs.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud