]> git.michaelhowe.org Git - packages/o/openafs.git/commit
LINUX: Do not lookup immediately recursive mtpts
authorAndrew Deason <adeason@sinenomine.net>
Fri, 6 Apr 2012 19:56:07 +0000 (14:56 -0500)
committerDerrick Brashear <shadow@dementix.org>
Tue, 14 Aug 2012 13:19:55 +0000 (06:19 -0700)
commit85432bf0b44fa2e1f54dc9d1798642d5b8b40b95
treed1d5a420a90e007dec9d12c7af40ae52b0b85393
parentdda3ea5f9ddda389955249e17a2e97b2e5ce7f1c
LINUX: Do not lookup immediately recursive mtpts

On Linux, having a mountpoint in a volume root that points to the same
volume can cause serious problems. By 'immediately recursive', I mean
a situation like the following:

fs mkm mtpt vol
fs mkm mtpt/mtpt vol

If there are multiple dentry aliases for the directory (which is
possible if the directory is a mountpoint), an 'rmdir' on the
recursive mountpoint can cause the client to deadlock. Since the
'rmdir' code path in Linux locks the parent directory inode to perform
the rmdir, and locks the child directory inode after performing a
couple of sanity checks. For an immediately recursive mountpoint,
these two inodes are the same, and so we will deadlock.

Reviewed-on: http://gerrit.openafs.org/7742
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
(cherry picked from commit d785abd5ec9302bdc1b3c33368246e573e0cd65d)

Change-Id: I531adbf66cf6714e04811356b072b17335980aa3
Reviewed-on: http://gerrit.openafs.org/7952
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/afs/LINUX/osi_vnodeops.c
src/afs/LINUX24/osi_vnodeops.c