diff options
author | Jeff Layton <jlayton@redhat.com> | 2012-10-10 15:25:25 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-10-12 00:32:03 -0400 |
commit | 4fa6b5ecbf092c6ee752ece8a55d71f663d23254 (patch) | |
tree | 6143912dc73b457a3be72faf31d46d855d3f87c3 /fs/btrfs | |
parent | e3d6b07b8ba161f638b026feba0c3c97875d7f1c (diff) |
audit: overhaul __audit_inode_child to accomodate retrying
In order to accomodate retrying path-based syscalls, we need to add a
new "type" argument to audit_inode_child. This will tell us whether
we're looking for a child entry that represents a create or a delete.
If we find a parent, don't automatically assume that we need to create a
new entry. Instead, use the information we have to try to find an
existing entry first. Update it if one is found and create a new one if
not.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index 49f4d59ac2c..61168805f17 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c | |||
@@ -638,7 +638,7 @@ static int btrfs_may_delete(struct inode *dir,struct dentry *victim,int isdir) | |||
638 | return -ENOENT; | 638 | return -ENOENT; |
639 | 639 | ||
640 | BUG_ON(victim->d_parent->d_inode != dir); | 640 | BUG_ON(victim->d_parent->d_inode != dir); |
641 | audit_inode_child(dir, victim); | 641 | audit_inode_child(dir, victim, AUDIT_TYPE_CHILD_DELETE); |
642 | 642 | ||
643 | error = inode_permission(dir, MAY_WRITE | MAY_EXEC); | 643 | error = inode_permission(dir, MAY_WRITE | MAY_EXEC); |
644 | if (error) | 644 | if (error) |