Lines Matching defs:victim
899 * Check whether we can remove a link victim from directory dir, check
900 * whether the type of victim is right.
907 * b. be owner of victim, or
909 * 6. If the victim is append-only or immutable we can't do anything with
911 * 7. If we were asked to remove a directory and victim isn't one - ENOTDIR.
912 * 8. If we were asked to remove a non-directory and victim isn't one - EISDIR.
918 static int btrfs_may_delete(struct inode *dir, struct dentry *victim, int isdir)
922 if (d_really_is_negative(victim))
925 BUG_ON(d_inode(victim->d_parent) != dir);
926 audit_inode_child(dir, victim, AUDIT_TYPE_CHILD_DELETE);
933 if (check_sticky(dir, d_inode(victim)) || IS_APPEND(d_inode(victim)) ||
934 IS_IMMUTABLE(d_inode(victim)) || IS_SWAPFILE(d_inode(victim)))
937 if (!d_is_dir(victim))
939 if (IS_ROOT(victim))
941 } else if (d_is_dir(victim))
945 if (victim->d_flags & DCACHE_NFSFS_RENAMED)