From dcb55704f990790898780fc7a280b1a378440b9c Mon Sep 17 00:00:00 2001 From: Chas Williams Date: Sat, 4 Jun 2005 18:08:55 +0000 Subject: [PATCH] linux26-clear-inode-locking-20050603 respect i_state flag (works for my test case, if it works more broadly i will pull up) --- src/afs/LINUX/osi_vfsops.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c index defdc484d..6372a3af3 100644 --- a/src/afs/LINUX/osi_vfsops.c +++ b/src/afs/LINUX/osi_vfsops.c @@ -287,6 +287,14 @@ afs_write_inode(struct inode *ip) #endif } +#if defined(AFS_LINUX26_ENV) +static void +afs_drop_inode(struct inode *ip) +{ + generic_delete_inode(ip); + AFS_GUNLOCK(); /* locked by afs_delete_inode() */ +} +#endif static void afs_destroy_inode(struct inode *ip) @@ -305,13 +313,15 @@ afs_destroy_inode(struct inode *ip) static void afs_delete_inode(struct inode *ip) { -#ifdef AFS_LINUX26_ENV +#if defined(AFS_LINUX26_ENV) + AFS_GLOCK(); /* after spin_unlock(inode_lock) */ put_inode_on_dummy_list(ip); -#endif - + osi_clear_inode(ip); +#else AFS_GLOCK(); osi_clear_inode(ip); AFS_GUNLOCK(); +#endif } @@ -404,7 +414,7 @@ afs_umount_begin(struct super_block *sbp) struct super_operations afs_sops = { #if defined(AFS_LINUX26_ENV) - .drop_inode = generic_delete_inode, + .drop_inode = afs_drop_inode, .destroy_inode = afs_destroy_inode, #endif .delete_inode = afs_delete_inode, -- 2.39.5