From: Miao Xie Date: Mon, 26 Nov 2012 08:44:50 +0000 (+0000) Subject: Btrfs: get write access when removing a device X-Git-Tag: v3.8-rc1~71^2~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=da24927b1e1925da5c1885cb483231dabe027e15;p=pandora-kernel.git Btrfs: get write access when removing a device Steps to reproduce: # mkfs.btrfs -d single -m single # mount -o ro # mount -o ro # mount -o remount,rw # umount # btrfs device delete We can remove a device from 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 Signed-off-by: Chris Mason --- Reading git-diff-tree failed