From: Jeff Mahoney Date: Mon, 15 Aug 2011 17:27:21 +0000 (+0000) Subject: btrfs: btrfs_permission's RO check shouldn't apply to device nodes X-Git-Tag: v3.1-rc3~14^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb6db4e57632ba8589cc2f9fe1d0aa9116b87ab8;p=pandora-kernel.git btrfs: btrfs_permission's RO check shouldn't apply to device nodes This patch tightens the read-only access checks in btrfs_permission to match the constraints in inode_permission. Currently, even though the device node itself will be unmodified, read-write access to device nodes is denied to when the device node resides on a read-only subvolume or a is a file that has been marked read-only by the btrfs conversion utility. With this patch applied, the check only affects regular files, directories, and symlinks. It also restructures the code a bit so that we don't duplicate the MAY_WRITE check for both tests. Signed-off-by: Jeff Mahoney Signed-off-by: Chris Mason --- Reading git-diff-tree failed