Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

fs: remove audit dummy context check

Now that we audit later during lookup_open() we can remove the audit
dummy context check. This simplifies things a lot.

Signed-off-by: Christian Brauner <brauner@kernel.org>

+1 -11
+1 -11
fs/namei.c
··· 3624 3624 /* Don't bother on an O_EXCL create */ 3625 3625 if (open_flag & O_EXCL) 3626 3626 return NULL; 3627 - 3628 - /* 3629 - * FIXME: If auditing is enabled, then we'll have to unlazy to 3630 - * use the dentry. For now, don't do this, since it shifts 3631 - * contention from parent's i_rwsem to its d_lockref spinlock. 3632 - * Reconsider this once dentry refcounting handles heavy 3633 - * contention better. 3634 - */ 3635 - if ((nd->flags & LOOKUP_RCU) && !audit_dummy_context()) 3636 - return NULL; 3637 3627 } 3638 3628 3639 3629 if (trailing_slashes(nd)) ··· 3677 3687 bool unlazied; 3678 3688 3679 3689 /* can stay in rcuwalk if not auditing */ 3680 - if (dentry && audit_dummy_context()) 3690 + if (dentry) 3681 3691 goto finish_lookup; 3682 3692 unlazied = dentry ? try_to_unlazy_next(nd, dentry) : 3683 3693 try_to_unlazy(nd);