dlmfs_file_write(): get rid of pointless access_ok()

address passed only to copy_from_user()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro 2020-04-23 13:52:23 -04:00
parent 3815f1be54
commit 37d59a5148

View File

@ -291,9 +291,6 @@ static ssize_t dlmfs_file_write(struct file *filp,
if (!count) if (!count)
return 0; return 0;
if (!access_ok(buf, count))
return -EFAULT;
lvb_buf = kmalloc(count, GFP_NOFS); lvb_buf = kmalloc(count, GFP_NOFS);
if (!lvb_buf) if (!lvb_buf)
return -ENOMEM; return -ENOMEM;