source:
branches/fc15-dev/server/common/patches/openafs-0008-Linux-2.6.38-dentry-d_count-is-not-an-atomic.patch
@
1893
Last change on this file since 1893 was 1835, checked in by achernya, 13 years ago | |
---|---|
File size: 2.7 KB |
-
acinclude.m4
From 7c3999e05c928991d22e3eeae2c69e5759c6ea4a Mon Sep 17 00:00:00 2001 From: Marc Dionne <marc.c.dionne@gmail.com> Date: Wed, 2 Feb 2011 21:55:27 -0500 Subject: [PATCH 8/8] Linux: 2.6.38: dentry->d_count is not an atomic d_count is now an int protected by the dentry's d_lock. Take the lock when we use it, instead of using an atomic_* function. Reviewed-on: http://gerrit.openafs.org/3883 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementia.org> (cherry picked from commit 281f5bf5fbb0a546edcce62ef4e097ae9bbdbf73) Change-Id: Id6b17d9cfe18d348a66df02f6b309fc53b00da86 Signed-off-by: Anders Kaseorg <andersk@mit.edu> Reviewed-on: http://gerrit.openafs.org/3999 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Russ Allbery <rra@stanford.edu> Reviewed-on: http://gerrit.openafs.org/4044 Reviewed-by: Derrick Brashear <shadow@dementia.org> Tested-by: Derrick Brashear <shadow@dementia.org> --- acinclude.m4 | 1 + src/afs/LINUX/osi_vnodeops.c | 9 +++++++++ src/cf/linux-test4.m4 | 12 ++++++++++++ 3 files changed, 22 insertions(+), 0 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 655fb11..c3f5e15 100644
a b case $AFS_SYSNAME in *_linux* | *_umlinux*) 818 818 LINUX_INIT_WORK_HAS_DATA 819 819 LINUX_REGISTER_SYSCTL_TABLE_NOFLAG 820 820 LINUX_HAVE_DCACHE_LOCK 821 LINUX_D_COUNT_IS_INT 821 822 LINUX_SYSCTL_TABLE_CHECKING 822 823 LINUX_STRUCT_CTL_TABLE_HAS_CTL_NAME 823 824 LINUX_HAVE_IGET -
src/afs/LINUX/osi_vnodeops.c
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c index e2a3e28..3118ec7 100644
a b afs_linux_rename(struct inode *oldip, struct dentry *olddp, 1396 1396 #endif 1397 1397 1398 1398 #if defined(AFS_LINUX24_ENV) 1399 #if defined(D_COUNT_INT) 1400 spin_lock(&olddp->d_lock); 1401 if (olddp->d_count > 1) { 1402 spin_unlock(&olddp->d_lock); 1403 shrink_dcache_parent(olddp); 1404 } else 1405 spin_unlock(&olddp->d_lock); 1406 #else 1399 1407 if (atomic_read(&olddp->d_count) > 1) 1400 1408 shrink_dcache_parent(olddp); 1401 1409 #endif 1410 #endif 1402 1411 1403 1412 AFS_GLOCK(); 1404 1413 code = afs_rename(VTOAFS(oldip), oldname, VTOAFS(newip), newname, credp); -
src/cf/linux-test4.m4
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4 index 2f426ce..b428f37 100644
a b AC_DEFUN([LINUX_HAVE_DCACHE_LOCK], [ 1327 1327 []) 1328 1328 ]) 1329 1329 1330 1331 AC_DEFUN([LINUX_D_COUNT_IS_INT], [ 1332 AC_CHECK_LINUX_BUILD([if dentry->d_count is an int], 1333 [ac_cv_linux_d_count_int], 1334 [#include <linux/dcache.h> ], 1335 [struct dentry _d; 1336 dget(&_d); 1337 _d.d_count = 1;], 1338 [D_COUNT_INT], 1339 [define if dentry->d_count is an int], 1340 [-Werror]) 1341 ])
Note: See TracBrowser
for help on using the repository browser.