From: Guangyu Sun Date: Tue, 11 Mar 2014 18:24:18 +0000 (-0700) Subject: Btrfs: return EPERM when deleting a default subvolume X-Git-Tag: v3.15-rc1~96^2~9 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72de6b5393c15c5228074008bbdc47e92bf6d4f7;p=pandora-kernel.git Btrfs: return EPERM when deleting a default subvolume The error message is confusing: # btrfs sub delete /mnt/mysub/ Delete subvolume '/mnt/mysub' ERROR: cannot delete '/mnt/mysub' - Directory not empty The error message does not make sense to me: It's not about deleting a directory but it's a subvolume, and it doesn't matter if the subvolume is empty or not. Maybe EPERM or is more appropriate in this case, combined with an explanatory kernel log message. (e.g. "subvolume with ID 123 cannot be deleted because it is configured as default subvolume.") Reported-by: Koen De Wit Signed-off-by: Guangyu Sun Reviewed-by: David Sterba Signed-off-by: Chris Mason --- Reading git-diff-tree failed