From: Andrew Deason Date: Wed, 17 Apr 2013 06:27:47 +0000 (-0500) Subject: LINUX: Avoid duplicate mntget in afs_dentry_open X-Git-Tag: upstream/1.6.3^2~16 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=d572281d5db2896362e9addf8a8157c618e3a776;p=packages%2Fo%2Fopenafs.git LINUX: Avoid duplicate mntget in afs_dentry_open 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 Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand Reviewed-by: Marc Dionne Reviewed-by: Derrick Brashear (cherry picked from commit e019429d4548348c6ab8674305d985feee040476) Change-Id: If88e108bb3e67602cf9e6bbe7646f9862228b684 Reviewed-on: http://gerrit.openafs.org/9792 Tested-by: BuildBot Reviewed-by: Andrew Deason Reviewed-by: Michael Meffie Reviewed-by: Marc Dionne Reviewed-by: Stephan Wiesand Tested-by: Stephan Wiesand --- diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h index e8bf0037e..01b9dae96 100644 --- a/src/afs/LINUX/osi_compat.h +++ b/src/afs/LINUX/osi_compat.h @@ -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