Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit afec570c authored by Ian Kent's avatar Ian Kent Committed by Linus Torvalds
Browse files

autofs4: fix sparse warning in waitq.c:autofs4_expire_indirect()



Re-order some code in expire.c:autofs4_expire_indirect() to avoid compile
warning, reported by Harvey Harrison:

 CHECK   fs/autofs4/expire.c
fs/autofs4/expire.c:383:2: warning: context imbalance in
'autofs4_expire_indirect' - unexpected unlock

Signed-off-by: default avatarIan Kent <raven@themaw.net>
Reviewed-by: default avatarHarvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c32e026e
Loading
Loading
Loading
Loading
+11 −13
Original line number Diff line number Diff line
@@ -333,7 +333,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
			/* Can we expire this guy */
			if (autofs4_can_expire(dentry, timeout, do_now)) {
				expired = dentry;
				break;
				goto found;
			}
			goto next;
		}
@@ -352,7 +352,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
				inf->flags |= AUTOFS_INF_EXPIRING;
				spin_unlock(&sbi->fs_lock);
				expired = dentry;
				break;
				goto found;
			}
			spin_unlock(&sbi->fs_lock);
		/*
@@ -363,7 +363,7 @@ static struct dentry *autofs4_expire_indirect(struct super_block *sb,
			expired = autofs4_check_leaves(mnt, dentry, timeout, do_now);
			if (expired) {
				dput(dentry);
				break;
				goto found;
			}
		}
next:
@@ -371,8 +371,10 @@ next:
		spin_lock(&dcache_lock);
		next = next->next;
	}
	spin_unlock(&dcache_lock);
	return NULL;

	if (expired) {
found:
	DPRINTK("returning %p %.*s",
		expired, (int)expired->d_name.len, expired->d_name.name);
	spin_lock(&dcache_lock);
@@ -380,10 +382,6 @@ next:
	spin_unlock(&dcache_lock);
	return expired;
}
	spin_unlock(&dcache_lock);

	return NULL;
}

/* Perform an expiry operation */
int autofs4_expire_run(struct super_block *sb,