2004-04-23 21:21:55

by Jim Radford

[permalink] [raw]
Subject: [PATCH] 2.6.6-rc2 nfs_fsync() breaks "cvs update"

Hi Trond,

This patch keeps the positive return values of nfs_commit_inode() from
leaking out to fsync(). Without this "cvs update" to an nfs dir
breaks.

-Jim

--- linux-2.6/fs/nfs/write.c.orig 2004-04-16 16:22:19.000000000 -0700
+++ linux-2.6/fs/nfs/write.c 2004-04-23 14:04:26.000000000 -0700
@@ -357,8 +357,10 @@
goto out;
}
err = nfs_commit_inode(inode, 0, 0, wb_priority(wbc));
- if (err > 0)
+ if (err > 0) {
wbc->nr_to_write -= err;
+ err = 0;
+ }
out:
clear_bit(BDI_write_congested, &bdi->state);
wake_up_all(&nfs_write_congestion);


2004-04-24 06:53:16

by FabF

[permalink] [raw]
Subject: RE: [PATCH] 2.6.6-rc2 nfs_fsync() breaks "cvs update"

Jim,

Maybe we could add some explicit comment here ?

Regards,
Fabian


Attachments:
nfscommitinode2.diff (500.00 B)