dput(): turn into explicit while() loop

No need to mess with gotos when the code yielded by straight while()
isn't any worse...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2018-04-15 18:31:03 -04:00
parent 9c5f1d3019
commit 1088a6408c
1 changed files with 13 additions and 18 deletions

View File

@ -828,10 +828,7 @@ static inline bool fast_dput(struct dentry *dentry)
*/ */
void dput(struct dentry *dentry) void dput(struct dentry *dentry)
{ {
if (unlikely(!dentry)) while (dentry) {
return;
repeat:
might_sleep(); might_sleep();
rcu_read_lock(); rcu_read_lock();
@ -849,8 +846,6 @@ repeat:
} }
dentry = dentry_kill(dentry); dentry = dentry_kill(dentry);
if (dentry) {
goto repeat;
} }
} }
EXPORT_SYMBOL(dput); EXPORT_SYMBOL(dput);