kNFSd - 4 of 4 - Make sure dnotify events happen for NFS read and write.
Subsystems (2)
PATCH 1/1 kNFSd - 4 of 4 - Make sure dnotify events happen for NFS read and write.
### Comments for ChangeSet
Based on code from Terje Malmedal <[email protected]>
----------- Diffstat output ------------
./fs/nfsd/vfs.c | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-)
fs/nfsd/vfs.c renamed from fs/nfsd/vfs.c~current~ +6 -2
@@ -43,6 +43,7 @@#endif /* CONFIG_NFSD_V3 */ #include <linux/nfsd/nfsfh.h> #include <linux/quotaops.h> +#include <linux/dnotify.h> #include <asm/uaccess.h>
@@ -680,6 +681,7 @@ nfsd_read(struct svc_rqst *rqstp, struct nfsdstats.io_read += err; *count = err; err =0 ; +dnotify_parent (file.f_dentry,DN_ACCESS ); }else err =nfserrno (err); out_close:
@@ -745,9 +747,11 @@ nfsd_write(struct svc_rqst *rqstp, struc/* Write the data. */ oldfs =get_fs ();set_fs (KERNEL_DS ); err =vfs_writev (&file, vec, vlen, &offset); -if (err >=0 ) - nfsdstats.io_write += cnt;set_fs (oldfs); +if (err >=0 ) { + nfsdstats.io_write += cnt; +dnotify_parent (file.f_dentry,DN_MODIFY ); + }/* clear setuid/setgid flag after write */ if (err >=0 && (inode->i_mode & (S_ISUID |S_ISGID ))) {
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program. Does SourceForge.net help you be more productive? Does it help you create better code? SHARE THE LOVE, and help us help YOU! Click Here: http://sourceforge.net/donate/
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs