From 012bb3e61e5eced6c610f9e036372bf0c8def2d1 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Thu, 5 Oct 2000 01:18:40 +0000 Subject: Merge with Linux 2.4.0-test9. Please check DECstation, I had a number of rejects to fixup while integrating Linus patches. I also found that this kernel will only boot SMP on Origin; the UP kernel freeze soon after bootup with SCSI timeout messages. I commit this anyway since I found that the last CVS versions had the same problem. --- fs/read_write.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'fs/read_write.c') diff --git a/fs/read_write.c b/fs/read_write.c index 3d3519146..00b0daf7e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -10,6 +10,7 @@ #include #include #include +#include #include @@ -132,6 +133,9 @@ asmlinkage ssize_t sys_read(unsigned int fd, char * buf, size_t count) ret = read(file, buf, count, &file->f_pos); } } + if (ret > 0) + inode_dir_notify(file->f_dentry->d_parent->d_inode, + DN_ACCESS); fput(file); } return ret; @@ -156,6 +160,9 @@ asmlinkage ssize_t sys_write(unsigned int fd, const char * buf, size_t count) ret = write(file, buf, count, &file->f_pos); } } + if (ret > 0) + inode_dir_notify(file->f_dentry->d_parent->d_inode, + DN_MODIFY); fput(file); } return ret; @@ -257,6 +264,10 @@ out: if (iov != iovstack) kfree(iov); out_nofree: + /* VERIFY_WRITE actually means a read, as we write to user space */ + if ((ret + (type == VERIFY_WRITE)) > 0) + inode_dir_notify(file->f_dentry->d_parent->d_inode, + (type == VERIFY_WRITE) ? DN_MODIFY : DN_ACCESS); return ret; } @@ -327,6 +338,8 @@ asmlinkage ssize_t sys_pread(unsigned int fd, char * buf, if (pos < 0) goto out; ret = read(file, buf, count, &pos); + if (ret > 0) + inode_dir_notify(file->f_dentry->d_parent->d_inode, DN_ACCESS); out: fput(file); bad_file: @@ -357,6 +370,8 @@ asmlinkage ssize_t sys_pwrite(unsigned int fd, const char * buf, goto out; ret = write(file, buf, count, &pos); + if (ret > 0) + inode_dir_notify(file->f_dentry->d_parent->d_inode, DN_MODIFY); out: fput(file); bad_file: -- cgit v1.2.3