Commit be56f07f authored by Anton Blanchard's avatar Anton Blanchard

Merge samba.org:/scratch/anton/linux-2.5

into samba.org:/scratch/anton/linux-2.5_ppc64_work
parents 05d43c5f 84f2d288
......@@ -246,5 +246,7 @@ EXPORT_SYMBOL(debugger_fault_handler);
EXPORT_SYMBOL(tb_ticks_per_usec);
#ifdef CONFIG_PROFILING
EXPORT_SYMBOL_GPL(register_profile_notifier);
EXPORT_SYMBOL_GPL(unregister_profile_notifier);
#endif
......@@ -208,19 +208,20 @@ static long do_readv_writev32(int type, struct file *file,
asmlinkage long sys32_readv(int fd, struct iovec32 *vector, u32 count)
{
struct file *file;
int ret;
int ret = -EBADF;
file = fget(fd);
if(!file)
return -EBADF;
if (!file || !(file->f_mode & FMODE_READ))
goto out;
if (!(file->f_mode & FMODE_READ))
return -EBADF;
ret = -EINVAL;
if (!file->f_op || (!file->f_op->readv && !file->f_op->read))
return -EINVAL;
goto out;
ret = do_readv_writev32(READ, file, vector, count);
out:
if (file)
fput(file);
return ret;
}
......@@ -228,19 +229,20 @@ asmlinkage long sys32_readv(int fd, struct iovec32 *vector, u32 count)
asmlinkage long sys32_writev(int fd, struct iovec32 *vector, u32 count)
{
struct file *file;
int ret;
int ret = -EBADF;
file = fget(fd);
if(!file)
return -EBADF;
if (!file || !(file->f_mode & FMODE_WRITE))
goto out;
if (!(file->f_mode & FMODE_WRITE))
return -EBADF;
ret = -EINVAL;
if (!file->f_op || (!file->f_op->writev && !file->f_op->write))
return -EINVAL;
goto out;
ret = do_readv_writev32(WRITE, file, vector, count);
out:
if (file)
fput(file);
return ret;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment