]> Pileus Git - ~andy/linux/blobdiff - fs/file_table.c
file->f_op is never NULL...
[~andy/linux] / fs / file_table.c
index 322cd37626cbc6de1e75ec5bdd6e4010d851e730..e61e5529fa9d07364a1ec5a37c977bb4e83271bf 100644 (file)
@@ -240,11 +240,11 @@ static void __fput(struct file *file)
        locks_remove_flock(file);
 
        if (unlikely(file->f_flags & FASYNC)) {
-               if (file->f_op && file->f_op->fasync)
+               if (file->f_op->fasync)
                        file->f_op->fasync(-1, file, 0);
        }
        ima_file_free(file);
-       if (file->f_op && file->f_op->release)
+       if (file->f_op->release)
                file->f_op->release(inode, file);
        security_file_free(file);
        if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL &&
@@ -311,8 +311,7 @@ void fput(struct file *file)
                                return;
                        /*
                         * After this task has run exit_task_work(),
-                        * task_work_add() will fail.  free_ipc_ns()->
-                        * shm_destroy() can do this.  Fall through to delayed
+                        * task_work_add() will fail.  Fall through to delayed
                         * fput to avoid leaking *file.
                         */
                }