]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
LINUX: Avoid duplicate mntget in afs_dentry_open
authorAndrew Deason <adeason@sinenomine.net>
Wed, 17 Apr 2013 06:27:47 +0000 (01:27 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Tue, 7 May 2013 15:02:41 +0000 (08:02 -0700)
Our caller already got a ref to 'mnt'; getting another one here will
overcount refs on 'mnt'.

This can make it impossible to unmount the filesystem the cache
resides on (even after the client is stopped), since it's ref count
will be very high.

FIXES 131613

Reviewed-on: http://gerrit.openafs.org/9790
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Derrick Brashear <shadow@your-file-system.com>
(cherry picked from commit e019429d4548348c6ab8674305d985feee040476)

Change-Id: If88e108bb3e67602cf9e6bbe7646f9862228b684
Reviewed-on: http://gerrit.openafs.org/9792
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marc Dionne <marc.c.dionne@gmail.com>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
Tested-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/afs/LINUX/osi_compat.h

index e8bf0037e5d1fc2265f72d4a68e84157f51484ce..01b9dae96def772f0fe8d661b9e6fcf707dbfcd1 100644 (file)
@@ -476,7 +476,7 @@ afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct
     filp = dentry_open(&path, flags, creds);
     return filp;
 #else
-    return dentry_open(dp, mntget(mnt), flags, creds);
+    return dentry_open(dp, mnt, flags, creds);
 #endif
 }
 #endif