Commit 39dfe6c6 authored by Al Viro's avatar Al Viro

ecryptfs: don't open-code kernel_read()

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0757f615
...@@ -232,17 +232,10 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size, ...@@ -232,17 +232,10 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
struct inode *ecryptfs_inode) struct inode *ecryptfs_inode)
{ {
struct file *lower_file; struct file *lower_file;
mm_segment_t fs_save;
ssize_t rc;
lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file; lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file;
if (!lower_file) if (!lower_file)
return -EIO; return -EIO;
fs_save = get_fs(); return kernel_read(lower_file, offset, data, size);
set_fs(get_ds());
rc = vfs_read(lower_file, data, size, &offset);
set_fs(fs_save);
return rc;
} }
/** /**
......
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