Skip to content

Commit 57498f9

Browse files
committed
Merge tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs
Pull minor eCryptfs fix from Tyler Hicks: "Quiet static checkers by removing unneeded conditionals" * tag 'ecryptfs-3.13-rc1-quiet-checkers' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs: eCryptfs: file->private_data is always valid
2 parents e48f88a + 2000f5b commit 57498f9

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

fs/ecryptfs/file.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -313,11 +313,9 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
313313
static long
314314
ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
315315
{
316-
struct file *lower_file = NULL;
316+
struct file *lower_file = ecryptfs_file_to_lower(file);
317317
long rc = -ENOTTY;
318318

319-
if (ecryptfs_file_to_private(file))
320-
lower_file = ecryptfs_file_to_lower(file);
321319
if (lower_file->f_op->unlocked_ioctl)
322320
rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
323321
return rc;
@@ -327,11 +325,9 @@ ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
327325
static long
328326
ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
329327
{
330-
struct file *lower_file = NULL;
328+
struct file *lower_file = ecryptfs_file_to_lower(file);
331329
long rc = -ENOIOCTLCMD;
332330

333-
if (ecryptfs_file_to_private(file))
334-
lower_file = ecryptfs_file_to_lower(file);
335331
if (lower_file->f_op && lower_file->f_op->compat_ioctl)
336332
rc = lower_file->f_op->compat_ioctl(lower_file, cmd, arg);
337333
return rc;

0 commit comments

Comments
 (0)