Skip to contentSkip to conversation

2.6.6-rc2 nfs_fsync() breaks "cvs update"

PATCH New Jim Radford 1 participant 1 message Apr 23, 2004 NFS client

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

fs/nfs/write.c renamed from fs/nfs/write.c.orig +3 -1
@@ -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);