|
@@ -313,11 +313,9 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
|
|
static long
|
|
static long
|
|
ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|
ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|
{
|
|
{
|
|
- struct file *lower_file = NULL;
|
|
|
|
|
|
+ struct file *lower_file = ecryptfs_file_to_lower(file);
|
|
long rc = -ENOTTY;
|
|
long rc = -ENOTTY;
|
|
|
|
|
|
- if (ecryptfs_file_to_private(file))
|
|
|
|
- lower_file = ecryptfs_file_to_lower(file);
|
|
|
|
if (lower_file->f_op->unlocked_ioctl)
|
|
if (lower_file->f_op->unlocked_ioctl)
|
|
rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
|
|
rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
|
|
return rc;
|
|
return rc;
|
|
@@ -327,11 +325,9 @@ ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|
static long
|
|
static long
|
|
ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|
ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
|
|
{
|
|
{
|
|
- struct file *lower_file = NULL;
|
|
|
|
|
|
+ struct file *lower_file = ecryptfs_file_to_lower(file);
|
|
long rc = -ENOIOCTLCMD;
|
|
long rc = -ENOIOCTLCMD;
|
|
|
|
|
|
- if (ecryptfs_file_to_private(file))
|
|
|
|
- lower_file = ecryptfs_file_to_lower(file);
|
|
|
|
if (lower_file->f_op && lower_file->f_op->compat_ioctl)
|
|
if (lower_file->f_op && lower_file->f_op->compat_ioctl)
|
|
rc = lower_file->f_op->compat_ioctl(lower_file, cmd, arg);
|
|
rc = lower_file->f_op->compat_ioctl(lower_file, cmd, arg);
|
|
return rc;
|
|
return rc;
|