Skip to content

Commit

Permalink
ecryptfs: don't open-code kernel_read()
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed May 9, 2013
1 parent 0757f61 commit 39dfe6c
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions fs/ecryptfs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,17 +232,10 @@ int ecryptfs_read_lower(char *data, loff_t offset, size_t size,
struct inode *ecryptfs_inode)
{
struct file *lower_file;
mm_segment_t fs_save;
ssize_t rc;

lower_file = ecryptfs_inode_to_private(ecryptfs_inode)->lower_file;
if (!lower_file)
return -EIO;
fs_save = get_fs();
set_fs(get_ds());
rc = vfs_read(lower_file, data, size, &offset);
set_fs(fs_save);
return rc;
return kernel_read(lower_file, offset, data, size);
}

/**
Expand Down

0 comments on commit 39dfe6c

Please sign in to comment.