From: Sage Weil Date: Fri, 29 Oct 2010 19:46:43 +0000 (-0400) Subject: Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed X-Git-Tag: v2.6.37-rc1~19^2~1 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4260f7c7516f4c209cf0ca34fda99cc9a0847772;p=pandora-kernel.git Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed Add a mount option user_subvol_rm_allowed that allows users to delete a (potentially non-empty!) subvol when they would otherwise we allowed to do an rmdir(2). We duplicate the may_delete() checks from the core VFS code to implement identical security checks (minus the directory size check). We additionally require that the user has write+exec permission on the subvol root inode. Signed-off-by: Sage Weil Signed-off-by: Chris Mason --- Reading git-diff-tree failed