tmp_suning_uos_patched/fs/nfs
Trond Myklebust c42de9dd67 NFS: Fix a race in nfs_sync_inode()
Kudos to Neil Brown for spotting the problem:

"in nfs_sync_inode, there is effectively the sequence:

   nfs_wait_on_requests
   nfs_flush_inode
   nfs_commit_inode

 This seems a bit racy to me as if the only requests are on the
 ->commit list, and nfs_commit_inode is called separately after
 nfs_wait_on_requests completes, and before nfs_commit_inode start
 (say: by nfs_write_inode) then none of these function will return
 >0, yet there will be some pending request that aren't waited for."

The solution is to search for requests to wait upon, search for dirty
requests, and search for uncommitted requests while holding the
nfsi->req_lock

The patch also cleans up nfs_sync_inode(), getting rid of the redundant
FLUSH_WAIT flag. It turns out that we were always setting it.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
2006-03-20 13:44:51 -05:00
..
callback_proc.c NFSv4: Ensure change attribute returned by GETATTR callback conforms to spec 2006-01-06 14:58:51 -05:00
callback_xdr.c NFSv4: Kill braindead gcc warnings 2006-03-20 13:44:10 -05:00
callback.c NFSv4: Ensure the callback daemon flushes signals 2006-03-20 13:44:49 -05:00
callback.h NFSv4: Allow user to set the port used by the NFSv4 callback channel 2006-01-06 14:58:52 -05:00
delegation.c NFSv4: Send the delegation stateid for SETATTR calls 2006-03-20 13:44:46 -05:00
delegation.h NFSv4: Send the delegation stateid for SETATTR calls 2006-03-20 13:44:46 -05:00
dir.c NFS: Make nfs_fhget() return appropriate error values 2006-03-20 13:44:48 -05:00
direct.c NFS: O_DIRECT needs to use a completion 2006-03-20 13:44:43 -05:00
file.c NFS, NLM: Allow blocking locks to respect signals 2006-03-20 13:44:48 -05:00
idmap.c NFS: sem2mutex idmap.c 2006-03-20 13:44:11 -05:00
inode.c NFS: Fix a race in nfs_sync_inode() 2006-03-20 13:44:51 -05:00
iostat.h NFSv4: Fix an oops in nfs4_fill_super 2006-03-20 13:44:48 -05:00
Makefile NFSv4: Allow user to set the port used by the NFSv4 callback channel 2006-01-06 14:58:52 -05:00
mount_clnt.c SUNRPC: eliminate rpc_call() 2006-03-20 13:44:23 -05:00
nfs2xdr.c SUNRPC: display human-readable procedure name in rpc_iostats output 2006-03-20 13:44:22 -05:00
nfs3acl.c SUNRPC: eliminate rpc_call() 2006-03-20 13:44:23 -05:00
nfs3proc.c NFS: Cleanup of NFS read code 2006-03-20 13:44:27 -05:00
nfs3xdr.c SUNRPC: display human-readable procedure name in rpc_iostats output 2006-03-20 13:44:22 -05:00
nfs4_fs.h NFSv4: Remove requirement for machine creds for the "setclientid" operation 2006-01-06 14:58:47 -05:00
nfs4proc.c NFS: Make nfs_fhget() return appropriate error values 2006-03-20 13:44:48 -05:00
nfs4renewd.c NFSv4: Remove requirement for machine creds for the "renew" operation 2006-01-06 14:58:47 -05:00
nfs4state.c NFSv4: SETCLIENTID_CONFIRM should handle NFS4ERR_DELAY/NFS4ERR_RESOURCE 2006-03-20 13:44:47 -05:00
nfs4xdr.c SUNRPC: display human-readable procedure name in rpc_iostats output 2006-03-20 13:44:22 -05:00
nfsroot.c [PATCH] nfsroot port= parameter fix [backport of 2.4 fix] 2006-02-07 21:00:42 -05:00
pagelist.c NFS: Fix a race with PG_private and nfs_release_page() 2006-03-20 13:44:50 -05:00
proc.c NFS: Cleanup of NFS read code 2006-03-20 13:44:27 -05:00
read.c NFS: Uninline nfs_writedata_(alloc|free) and nfs_readdata_(alloc|free) 2006-03-20 13:44:37 -05:00
symlink.c Fix nasty ncpfs symlink handling bug. 2005-08-19 18:02:56 -07:00
sysctl.c NFSv4: Allow entries in the idmap cache to expire 2006-01-06 14:58:58 -05:00
unlink.c NFS: kzalloc conversion in fs/nfs 2006-03-20 13:44:10 -05:00
write.c NFS: Fix a race in nfs_sync_inode() 2006-03-20 13:44:51 -05:00