Wei Yongjun a0d24b295a nfsd: fix hung up of nfs client while sync write data to nfs server
Commit 'Short write in nfsd becomes a full write to the client'
(31dec2538e45e9fff2007ea1f4c6bae9f78db724) broken the sync write.
With the following commands to reproduce:

  $ mount -t nfs -o sync 192.168.0.21:/nfsroot /mnt
  $ cd /mnt
  $ echo aaaa > temp.txt

Then nfs client is hung up.

In SYNC mode the server alaways return the write count 0 to the
client. This is because the value of host_err in nfsd_vfs_write()
will be overwrite in SYNC mode by 'host_err=nfsd_sync(file);',
and then we return host_err(which is now 0) as write count.

This patch fixed the problem.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
2009-05-27 17:40:06 -04:00
..
2009-01-27 17:26:59 -05:00
2008-02-01 16:42:05 -05:00
2008-10-03 16:19:02 -04:00
2007-05-09 12:30:54 -07:00
2008-06-23 13:02:50 -04:00
2008-06-23 13:02:50 -04:00
2008-02-14 21:17:08 -08:00
2008-04-23 16:13:39 -04:00
2009-04-03 17:41:23 -07:00
2009-05-11 17:23:14 -04:00
2008-02-14 21:17:08 -08:00