diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-09-19 19:15:08 +0000 |
commit | 03ba4131783cc9e872f8bb26a03f15bc11f27564 (patch) | |
tree | 88db8dba75ae06ba3bad08e42c5e52efc162535c /fs/read_write.c | |
parent | 257730f99381dd26e10b832fce4c94cae7ac1176 (diff) |
- Merge with Linux 2.1.121.
- Bugfixes.
Diffstat (limited to 'fs/read_write.c')
-rw-r--r-- | fs/read_write.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index 1f5c69e67..e36a2d1e1 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -288,7 +288,7 @@ asmlinkage ssize_t sys_readv(unsigned long fd, const struct iovec * vector, file = fget(fd); if (!file) goto bad_file; - if (file->f_mode & FMODE_READ) + if (file->f_op && file->f_op->read && (file->f_mode & FMODE_READ)) ret = do_readv_writev(VERIFY_WRITE, file, vector, count); fput(file); @@ -309,7 +309,7 @@ asmlinkage ssize_t sys_writev(unsigned long fd, const struct iovec * vector, file = fget(fd); if (!file) goto bad_file; - if (file->f_mode & FMODE_WRITE) { + if (file->f_op && file->f_op->write && (file->f_mode & FMODE_WRITE)) { down(&file->f_dentry->d_inode->i_sem); ret = do_readv_writev(VERIFY_READ, file, vector, count); up(&file->f_dentry->d_inode->i_sem); |