aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ecryptfs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-05-07 22:28:48 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-09 13:39:58 -0400
commit39dfe6c6a5ce7defc00f11790efb758954042cea (patch)
tree28616b7c161cd12d487a699cef4f083c6e18885a /fs/ecryptfs
parent0757f6159f13dcd9fe499befd4be57c5ee8afde8 (diff)
ecryptfs: don't open-code kernel_read()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ecryptfs')
-rw-r--r--fs/ecryptfs/read_write.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/fs/ecryptfs/read_write.c b/fs/ecryptfs/read_write.c
index 6a160539cd23..09fe622274e4 100644
--- a/fs/ecryptfs/read_write.c
+++ b/fs/ecryptfs/read_write.c
@@ -232,17 +232,10 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
232 struct inode *ecryptfs_inode) 232 struct inode *ecryptfs_inode)
233{ 233{
234 struct file *lower_file; 234 struct file *lower_file;
235 mm_segment_t fs_save;
236 ssize_t rc;
237
238 lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file; 235 lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file;
239 if (!lower_file) 236 if (!lower_file)
240 return -EIO; 237 return -EIO;
241 fs_save = get_fs(); 238 return kernel_read(lower_file, offset, data, size);
242 set_fs(get_ds());
243 rc = vfs_read(lower_file, data, size, &offset);
244 set_fs(fs_save);
245 return rc;
246} 239}
247 240
248/** 241/**