summaryrefslogtreecommitdiff
path: root/fs/exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/exec.c')
-rw-r--r--fs/exec.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/exec.c b/fs/exec.c
index 21222017549d..dff548c08e5a 100644
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -131,7 +131,7 @@ asmlinkage long sys_uselib(const char * library)
goto out;
error = -ENOEXEC;
- if(file->f_op && file->f_op->read) {
+ if(file->f_op) {
struct linux_binfmt * fmt;
read_lock(&binfmt_lock);
@@ -452,19 +452,16 @@ out:
}
int kernel_read(struct file *file, unsigned long offset,
- char * addr, unsigned long count)
+ char *addr, unsigned long count)
{
mm_segment_t old_fs;
loff_t pos = offset;
- int result = -ENOSYS;
+ int result;
- if (!file->f_op->read)
- goto fail;
old_fs = get_fs();
set_fs(get_ds());
- result = file->f_op->read(file, addr, count, &pos);
+ result = vfs_read(file, addr, count, &pos);
set_fs(old_fs);
-fail:
return result;
}