Commit d459c52a authored by Christian Brauner's avatar Christian Brauner

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: default avatarChristian Brauner <brauner@kernel.org>
parent 4770d96a
...@@ -3624,16 +3624,6 @@ static struct dentry *lookup_fast_for_open(struct nameidata *nd, int open_flag) ...@@ -3624,16 +3624,6 @@ static struct dentry *lookup_fast_for_open(struct nameidata *nd, int open_flag)
/* Don't bother on an O_EXCL create */ /* Don't bother on an O_EXCL create */
if (open_flag & O_EXCL) if (open_flag & O_EXCL)
return NULL; return NULL;
/*
* FIXME: If auditing is enabled, then we'll have to unlazy to
* use the dentry. For now, don't do this, since it shifts
* contention from parent's i_rwsem to its d_lockref spinlock.
* Reconsider this once dentry refcounting handles heavy
* contention better.
*/
if ((nd->flags & LOOKUP_RCU) && !audit_dummy_context())
return NULL;
} }
if (trailing_slashes(nd)) if (trailing_slashes(nd))
...@@ -3687,7 +3677,7 @@ static const char *open_last_lookups(struct nameidata *nd, ...@@ -3687,7 +3677,7 @@ static const char *open_last_lookups(struct nameidata *nd,
bool unlazied; bool unlazied;
/* can stay in rcuwalk if not auditing */ /* can stay in rcuwalk if not auditing */
if (dentry && audit_dummy_context()) if (dentry)
goto finish_lookup; goto finish_lookup;
unlazied = dentry ? try_to_unlazy_next(nd, dentry) : unlazied = dentry ? try_to_unlazy_next(nd, dentry) :
try_to_unlazy(nd); try_to_unlazy(nd);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment