X-Git-Url: http://git.agner.ch/gitweb/?a=blobdiff_plain;f=fs%2Fecryptfs%2Ffile.c;h=b1eaa7a1f82cd0ce03ebb0bad15c2d8f5b6f6e9c;hb=f647a52e1576f9c92cc9c02d5756cd0207295a2b;hp=2229a74aeeedaab2a6b6b49f9c4c9309f1369367;hpb=73d75ba99e3bdd627275afd3fe48cc933723084b;p=linux-drm-fsl-dcu.git diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 2229a74aeeed..b1eaa7a1f82c 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c @@ -313,11 +313,9 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag) static long 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; - if (ecryptfs_file_to_private(file)) - lower_file = ecryptfs_file_to_lower(file); if (lower_file->f_op->unlocked_ioctl) rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg); return rc; @@ -327,11 +325,9 @@ ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg) static long 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; - if (ecryptfs_file_to_private(file)) - lower_file = ecryptfs_file_to_lower(file); if (lower_file->f_op && lower_file->f_op->compat_ioctl) rc = lower_file->f_op->compat_ioctl(lower_file, cmd, arg); return rc;