rpms/kernel/FC-4 linux-2.6-NFSD-locking-fix.patch, NONE, 1.1 kernel-2.6.spec, 1.1507, 1.1508
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Mon Nov 21 16:35:41 UTC 2005
Author: davej
Update of /cvs/dist/rpms/kernel/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv12752
Modified Files:
kernel-2.6.spec
Added Files:
linux-2.6-NFSD-locking-fix.patch
Log Message:
Fix some broken locking in NFSD.
linux-2.6-NFSD-locking-fix.patch:
inode.c | 26 ++++++++++++--------------
1 files changed, 12 insertions(+), 14 deletions(-)
--- NEW FILE linux-2.6-NFSD-locking-fix.patch ---
--- linux-2.6.14/fs/nfs/inode.c.orig 2005-11-16 12:04:36.464685000 -0500
+++ linux-2.6.14/fs/nfs/inode.c 2005-11-18 06:09:40.543264000 -0500
@@ -643,14 +643,11 @@ static int nfs_show_options(struct seq_f
/*
* Invalidate the local caches
*/
-void
-nfs_zap_caches(struct inode *inode)
+static void nfs_zap_caches_locked(struct inode *inode)
{
struct nfs_inode *nfsi = NFS_I(inode);
int mode = inode->i_mode;
- spin_lock(&inode->i_lock);
-
NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode);
NFS_ATTRTIMEO_UPDATE(inode) = jiffies;
@@ -659,7 +656,12 @@ nfs_zap_caches(struct inode *inode)
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_DATA|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
else
nfsi->cache_validity |= NFS_INO_INVALID_ATTR|NFS_INO_INVALID_ACCESS|NFS_INO_INVALID_ACL|NFS_INO_REVAL_PAGECACHE;
+}
+void nfs_zap_caches(struct inode *inode)
+{
+ spin_lock(&inode->i_lock);
+ nfs_zap_caches_locked(inode);
spin_unlock(&inode->i_lock);
}
@@ -676,16 +678,13 @@ static void nfs_zap_acl_cache(struct ino
}
/*
- * Invalidate, but do not unhash, the inode
+ * Invalidate, but do not unhash, the inode.
+ * NB: must be called with inode->i_lock held!
*/
-static void
-nfs_invalidate_inode(struct inode *inode)
+static void nfs_invalidate_inode(struct inode *inode)
{
- umode_t save_mode = inode->i_mode;
-
- make_bad_inode(inode);
- inode->i_mode = save_mode;
- nfs_zap_caches(inode);
+ set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
+ nfs_zap_caches_locked(inode);
}
struct nfs_find_desc {
@@ -1528,14 +1527,13 @@ static int nfs_update_inode(struct inode
printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n",
__FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode);
#endif
+ out_err:
/*
* No need to worry about unhashing the dentry, as the
* lookup validation will know that the inode is bad.
* (But we fall through to invalidate the caches.)
*/
nfs_invalidate_inode(inode);
- out_err:
- set_bit(NFS_INO_STALE, &NFS_FLAGS(inode));
return -ESTALE;
}
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/FC-4/kernel-2.6.spec,v
retrieving revision 1.1507
retrieving revision 1.1508
diff -u -r1.1507 -r1.1508
--- kernel-2.6.spec 21 Nov 2005 16:28:41 -0000 1.1507
+++ kernel-2.6.spec 21 Nov 2005 16:35:37 -0000 1.1508
@@ -295,6 +295,7 @@
# NFS bits.
Patch1200: linux-2.6-NFSD-non-null-getxattr.patch
Patch1201: linux-2.6-NFSD-ctlbits.patch
+Patch1202: linux-2.6-NFSD-locking-fix.patch
# NIC driver updates
Patch1301: linux-2.6-net-sundance-ip100A.patch
@@ -698,6 +699,8 @@
%patch1200 -p1
# kNFSD: fixed '-p port' arg to rpc.nfsd and enables the defining proto versions and transports
%patch1201 -p1
+# Fix badness in NFSD locking
+%patch1202 -p1
# NIC driver fixes.
# New PCI ID for sundance driver.
@@ -1252,6 +1255,7 @@
%changelog
* Mon Nov 21 2005 Dave Jones <davej at redhat.com>
- Remove broken hostname changes in revision field of kernel spec. (#173366)
+- Fix some broken locking in NFSD.
* Mon Nov 14 2005 Dave Jones <davej at redhat.com> [2.6.14-1.1640_FC4]
- Fix memory leak with file leases. (#172691)
More information about the fedora-cvs-commits
mailing list