]> Pileus Git - ~andy/linux/blobdiff - fs/ecryptfs/file.c
file->f_op is never NULL...
[~andy/linux] / fs / ecryptfs / file.c
index 992cf95830b5792a5d510f7d588049d27c139a94..6b1cd2b0c75179f822319c6ae7a28c06fb108b53 100644 (file)
@@ -271,7 +271,7 @@ static int ecryptfs_flush(struct file *file, fl_owner_t td)
 {
        struct file *lower_file = ecryptfs_file_to_lower(file);
 
-       if (lower_file->f_op && lower_file->f_op->flush) {
+       if (lower_file->f_op->flush) {
                filemap_write_and_wait(file->f_mapping);
                return lower_file->f_op->flush(lower_file, td);
        }
@@ -305,7 +305,7 @@ static int ecryptfs_fasync(int fd, struct file *file, int flag)
        struct file *lower_file = NULL;
 
        lower_file = ecryptfs_file_to_lower(file);
-       if (lower_file->f_op && lower_file->f_op->fasync)
+       if (lower_file->f_op->fasync)
                rc = lower_file->f_op->fasync(fd, lower_file, flag);
        return rc;
 }
@@ -318,7 +318,7 @@ ecryptfs_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        if (ecryptfs_file_to_private(file))
                lower_file = ecryptfs_file_to_lower(file);
-       if (lower_file && lower_file->f_op && lower_file->f_op->unlocked_ioctl)
+       if (lower_file->f_op && lower_file->f_op->unlocked_ioctl)
                rc = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
        return rc;
 }
@@ -332,7 +332,7 @@ ecryptfs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        if (ecryptfs_file_to_private(file))
                lower_file = ecryptfs_file_to_lower(file);
-       if (lower_file && 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);
        return rc;
 }