fs/btrfs: Return EPERM for rmdir on subvolumes and snapshots
diff mbox

Message ID 1270758931-5291-1-git-send-email-harsha@gluster.com
State New, archived
Headers show

Commit Message

R Harshavardhana April 8, 2010, 8:35 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index a85b90c..c0fbe03 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -2593,7 +2593,7 @@  static int btrfs_rmdir(struct inode *dir, struct dentry *dentry)
 
 	if (inode->i_size > BTRFS_EMPTY_DIR_SIZE ||
 	    inode->i_ino == BTRFS_FIRST_FREE_OBJECTID)
-		return -ENOTEMPTY;
+		return -EPERM;
 
 	ret = btrfs_reserve_metadata_space(root, 5);
 	if (ret)