diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-10-05 01:18:40 +0000 |
commit | 012bb3e61e5eced6c610f9e036372bf0c8def2d1 (patch) | |
tree | 87efc733f9b164e8c85c0336f92c8fb7eff6d183 /fs/read_write.c | |
parent | 625a1589d3d6464b5d90b8a0918789e3afffd220 (diff) |
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.
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 15 |
1 files changed, 15 insertions, 0 deletions
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 <linux/file.h> #include <linux/uio.h> #include <linux/smp_lock.h> +#include <linux/dnotify.h> #include <asm/uaccess.h> @@ -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: |