dnotify readv/writev fix for 2.4.21
Marcelo,
This patch didn't make it into 2.4.21. Zou Pengcheng's original patch was whitespace-damaged, so here's a fresh copy against 2.4.21.
Issue DN_MODIFY on writev, and DN_ACCESS on readv, rather than vice versa.
I can provide a testcase if anyone wants one.
----- Forwarded message from Zou Pengcheng <[email protected]> -----
From: Zou Pengcheng <[email protected]>
To: Marcelo Tosatti <[email protected]>
Cc: [email protected]
Subject: [PATCH] dnotify fix for readv/writev (Linux 2.4.20)
Date: Mon, 2 Dec 2002 09:22:43 +0800
Message-Id: <[email protected]>
hi, Marcelo,
this is a patch to fix the dnotify bug of readv/writev.
Orignally DN_MODIFY is issued on readv while DN_ACCESS is issued on writev, which is obviously wrong. This patch fixes such problem.
cheers,
-- Pengcheng Zou
diff -uNr fs/read_write.c.orig fs/read_write.c
...
----- End forwarded message -----
fs/read_write.c +1 -1
@@ -322,7 +322,7 @@/* VERIFY_WRITE actually means a read, as we write to user space */ if ((ret + (type ==VERIFY_WRITE )) >0 )dnotify_parent (file->f_dentry, - (type ==VERIFY_WRITE ) ?DN_MODIFY :DN_ACCESS ); + (type ==VERIFY_WRITE ) ?DN_ACCESS :DN_MODIFY );return ret; }
-andy