]> git.baikalelectronics.ru Git - kernel.git/commit
autofs - Fix sparse warning: context imbalance in autofs4_d_automount() different...
authorPeter Huewe <peterhuewe@gmx.de>
Fri, 1 Mar 2013 11:46:40 +0000 (19:46 +0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 1 Mar 2013 20:04:39 +0000 (12:04 -0800)
commit5fe5cf39c2891c9b70f3a944de6343418f90f970
tree3fda1dd5842eafb90405d3566407b0c55816ddec
parent3297eb8da1ef05a0e78a6104a25ab95f81752330
autofs - Fix sparse warning: context imbalance in autofs4_d_automount() different lock contexts for basic block

Sparse complains:

  fs/autofs4/root.c:409:9: sparse: context imbalance in 'autofs4_d_automount' - different lock contexts for basic block

This was introduced by commit 11e617904c1b ("autofs4 - dont clear
DCACHE_NEED_AUTOMOUNT on rootless mount")

The function autofs4_d_automount can be left with the (&sbi->fs_lock)
held if sbi->version <= 4 and simple_empty(dentry) == false so the
warning seems valid.

--> Add an spin_unlock in this case before we jump to done

Unfortunately compile tested only.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Ian Kent <raven@themaw.net>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/autofs4/root.c