Displaying 1 result from an estimated 1 matches for "btrfs_may_delet".
Did you mean:
btrfs_may_delete
2010 Oct 25
2
[PATCH] Btrfs: allow subvol deletion by unprivileged user with -o user_subvol_rm_allowed
...one - ENOTDIR.
+ * 8. If we were asked to remove a non-directory and victim isn''t one - EISDIR.
+ * 9. We can''t remove a root or mountpoint.
+ * 10. We don''t allow removal of NFS sillyrenamed files; it''s handled by
+ * nfs_async_unlink().
+ */
+
+static int btrfs_may_delete(struct inode *dir,struct dentry *victim,int isdir)
+{
+ int error;
+
+ if (!victim->d_inode)
+ return -ENOENT;
+
+ BUG_ON(victim->d_parent->d_inode != dir);
+ audit_inode_child(victim, dir);
+
+ error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
+ if (error)
+ return error;
+ if (IS_A...