public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] 2.6.6-rc2 nfs_fsync() breaks "cvs update"
@ 2004-04-23 21:21 Jim Radford
  0 siblings, 0 replies; 2+ messages in thread
From: Jim Radford @ 2004-04-23 21:21 UTC (permalink / raw)
  To: Trond Myklebust; +Cc: linux-kernel

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);


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] 2.6.6-rc2 nfs_fsync() breaks "cvs update"
@ 2004-04-24  6:57 FabF
  0 siblings, 0 replies; 2+ messages in thread
From: FabF @ 2004-04-24  6:57 UTC (permalink / raw)
  To: lkml

[-- Attachment #1: Type: text/plain, Size: 72 bytes --]

Jim,

	Maybe we could add some explicit comment here ?

Regards,
Fabian

[-- Attachment #2: nfscommitinode2.diff --]
[-- Type: text/x-patch, Size: 500 bytes --]

diff -Naur orig/fs/nfs/write.c edited/fs/nfs/write.c
--- orig/fs/nfs/write.c	2004-04-21 18:10:52.000000000 +0200
+++ edited/fs/nfs/write.c	2004-04-24 08:53:46.000000000 +0200
@@ -357,8 +357,11 @@
 			goto out;
 	}
 	err = nfs_commit_inode(inode, 0, 0, wb_priority(wbc));
-	if (err > 0)
+	if (err > 0){
 		wbc->nr_to_write -= err;
+		/* nfs_scan_list returned processed requests => no error */
+		err = 0;
+	}
 out:
 	clear_bit(BDI_write_congested, &bdi->state);
 	wake_up_all(&nfs_write_congestion);

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-04-24  6:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-23 21:21 [PATCH] 2.6.6-rc2 nfs_fsync() breaks "cvs update" Jim Radford
  -- strict thread matches above, loose matches on Subject: below --
2004-04-24  6:57 FabF

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox