2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-17 01:34:00 +08:00
linux-next/fs/configfs
Louis Rilling 420118caa3 configfs: Rework configfs_depend_item() locking and make lockdep happy
configfs_depend_item() recursively locks all inodes mutex from configfs root to
the target item, which makes lockdep unhappy. The purpose of this recursive
locking is to ensure that the item tree can be safely parsed and that the target
item, if found, is not about to leave.

This patch reworks configfs_depend_item() locking using configfs_dirent_lock.
Since configfs_dirent_lock protects all changes to the configfs_dirent tree, and
protects tagging of items to be removed, this lock can be used instead of the
inodes mutex lock chain.
This needs that the check for dependents be done atomically with
CONFIGFS_USET_DROPPING tagging.

Now lockdep looks happy with configfs.

[ Lifted the setting of s_type into configfs_new_dirent() to satisfy the
  atomic setting of CONFIGFS_USET_CREATING  -- Joel ]

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
2009-04-30 10:48:26 -07:00
..
configfs_internal.h configfs: Silence lockdep on mkdir() and rmdir() 2009-04-30 10:48:23 -07:00
dir.c configfs: Rework configfs_depend_item() locking and make lockdep happy 2009-04-30 10:48:26 -07:00
file.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
inode.c configfs: Silence lockdep on mkdir() and rmdir() 2009-04-30 10:48:23 -07:00
item.c [PATCH] configfs+dlm: Rename config_group_find_obj and state semantics clearly 2007-07-10 17:02:31 -07:00
Kconfig fs/Kconfig: move configfs out 2009-01-22 13:15:56 +03:00
Makefile [PATCH] configfs: User-driven configuration filesystem 2006-01-03 11:45:28 -08:00
mount.c fs: replace remaining __FUNCTION__ occurrences 2008-04-30 08:29:54 -07:00
symlink.c configfs: Fix Trivial Warning in fs/configfs/symlink.c 2009-04-21 12:59:21 -07:00