The patch titled proc: remove useless checks in proc_register() has been removed from the -mm tree. Its filename was proc-remove-useless-checks-in-proc_register.patch This patch was dropped because it is obsolete The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: proc: remove useless checks in proc_register() From: Alexey Dobriyan <adobriyan@xxxxx> Before proc_register() all PDEs are created by proc_create() which doesn't set ->proc_iops and ->proc_fops -- they're NULL. So those branches in proc_register() are always taken. Signed-off-by: Alexey Dobriyan <adobriyan@xxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/generic.c | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff -puN fs/proc/generic.c~proc-remove-useless-checks-in-proc_register fs/proc/generic.c --- a/fs/proc/generic.c~proc-remove-useless-checks-in-proc_register +++ a/fs/proc/generic.c @@ -528,19 +528,14 @@ static int proc_register(struct proc_dir dp->low_ino = i; if (S_ISDIR(dp->mode)) { - if (dp->proc_iops == NULL) { - dp->proc_fops = &proc_dir_operations; - dp->proc_iops = &proc_dir_inode_operations; - } + dp->proc_fops = &proc_dir_operations; + dp->proc_iops = &proc_dir_inode_operations; dir->nlink++; } else if (S_ISLNK(dp->mode)) { - if (dp->proc_iops == NULL) - dp->proc_iops = &proc_link_inode_operations; + dp->proc_iops = &proc_link_inode_operations; } else if (S_ISREG(dp->mode)) { - if (dp->proc_fops == NULL) - dp->proc_fops = &proc_file_operations; - if (dp->proc_iops == NULL) - dp->proc_iops = &proc_file_inode_operations; + dp->proc_fops = &proc_file_operations; + dp->proc_iops = &proc_file_inode_operations; } spin_lock(&proc_subdir_lock); _ Patches currently in -mm which might be from adobriyan@xxxxx are gregkh-driver-block-device-genhd-fixup-kobj_to_dev-macro.patch gregkh-driver-kobject-convert-hvcs-to-use-kref-not-kobject-hvcs-fixup-container_of-usage.patch proc-remove-module_license.patch proc-less-lock-operations-during-lookup.patch proc-simplify-function-prototypes.patch proc-remove-useless-check-on-symlink-removal.patch proc-remove-useless-checks-in-proc_register.patch proc-detect-duplicate-names-on-registration.patch proc-detect-duplicate-names-on-registration-fix.patch fixup-container_of-usage.patch single_open-seq_release-leak-diagnostics.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html