]> err.no Git - linux-2.6/commit
[PATCH] configfs: Lock new directory inodes before removing on cleanup after failure
authorLouis Rilling <louis.rilling@kerlabs.com>
Fri, 4 Jul 2008 14:56:06 +0000 (16:56 +0200)
committerMark Fasheh <mfasheh@suse.com>
Thu, 31 Jul 2008 23:21:13 +0000 (16:21 -0700)
commit2e2ce171c3ba6f2753fb1fd2706b63683394da2d
treeb3b75b6b140ab6807754fd500c5a55b0cb7324f8
parent2a109f2a4155f168047aa2f5b3a170e279bef89a
[PATCH] configfs: Lock new directory inodes before removing on cleanup after failure

Once a new configfs directory is created by configfs_attach_item() or
configfs_attach_group(), a failure in the remaining initialization steps leads
to removing a directory which inode the VFS may have already accessed.

This commit adds the necessary inode locking to safely remove configfs
directories while cleaning up after a failure. As an advantage, the locking
rules of populate_groups() and detach_groups() become the same: the caller must
have the group's inode mutex locked.

Signed-off-by: Louis Rilling <louis.rilling@kerlabs.com>
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
fs/configfs/dir.c