aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2012-10-10 15:25:21 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2012-10-12 00:32:00 -0400
commitc43a25abba97c7d87131e71db6be24b24d7791a5 (patch)
tree0fe959853254064e17805ca111838e7869720e43 /fs
parentaudit: no need to walk list in audit_inode if name is NULL (diff)
downloadlinux-dev-c43a25abba97c7d87131e71db6be24b24d7791a5.tar.xz
linux-dev-c43a25abba97c7d87131e71db6be24b24d7791a5.zip
audit: reverse arguments to audit_inode_child
Most of the callers get called with an inode and dentry in the reverse order. The compiler then has to reshuffle the arg registers and/or stack in order to pass them on to audit_inode_child. Reverse those arguments for a micro-optimization. Reported-by: Eric Paris <eparis@redhat.com> Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c2
-rw-r--r--fs/namei.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index e568c472f807..49f4d59ac2c7 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)
return -ENOENT;
BUG_ON(victim->d_parent->d_inode != dir);
- audit_inode_child(victim, dir);
+ audit_inode_child(dir, victim);
error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
if (error)
diff --git a/fs/namei.c b/fs/namei.c
index f04ce1142297..a7ad35c66807 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -2176,7 +2176,7 @@ static int may_delete(struct inode *dir,struct dentry *victim,int isdir)
return -ENOENT;
BUG_ON(victim->d_parent->d_inode != dir);
- audit_inode_child(victim, dir);
+ audit_inode_child(dir, victim);
error = inode_permission(dir, MAY_WRITE | MAY_EXEC);
if (error)