patch-2.4.0-test9 linux/fs/nfs/file.c
Next file: linux/fs/nfs/inode.c
Previous file: linux/fs/nfs/dir.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Mon Sep 18 15:18:56 2000
- Orig file:
v2.4.0-test8/linux/fs/nfs/file.c
- Orig date:
Thu Jun 29 16:02:40 2000
diff -u --recursive --new-file v2.4.0-test8/linux/fs/nfs/file.c linux/fs/nfs/file.c
@@ -291,10 +291,13 @@
status = 0;
/*
- * Make sure we re-validate anything we've got cached.
+ * Make sure we clear the cache whenever we try to get the lock.
* This makes locking act as a cache coherency point.
*/
out_ok:
- NFS_CACHEINV(inode);
+ if ((cmd == F_SETLK || cmd == F_SETLKW) && fl->fl_type != F_UNLCK) {
+ nfs_wb_all(inode); /* we may have slept */
+ nfs_zap_caches(inode);
+ }
return status;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)