The patch titled Subject: fs/ubifs/: remove unnecessary new_valid_dev() checks has been added to the -mm tree. Its filename is fs-ubifs-remove-unnecessary-new_valid_dev-check.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/fs-ubifs-remove-unnecessary-new_valid_dev-check.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/fs-ubifs-remove-unnecessary-new_valid_dev-check.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Yaowei Bai <bywxiaobai@xxxxxxx> Subject: fs/ubifs/: remove unnecessary new_valid_dev() checks new_valid_dev() always returns 1, so the !new_valid_dev() checks are not needed. Remove them. Signed-off-by: Yaowei Bai <bywxiaobai@xxxxxxx> Cc: Alexander Viro <viro@xxxxxxxxxxxxxxxxxx> Acked-by: Artem Bityutskiy <artem.bityutskiy@xxxxxxxxxxxxxxx> Cc: Adrian Hunter <adrian.hunter@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ubifs/dir.c | 3 --- fs/ubifs/misc.h | 9 ++------- 2 files changed, 2 insertions(+), 10 deletions(-) diff -puN fs/ubifs/dir.c~fs-ubifs-remove-unnecessary-new_valid_dev-check fs/ubifs/dir.c --- a/fs/ubifs/dir.c~fs-ubifs-remove-unnecessary-new_valid_dev-check +++ a/fs/ubifs/dir.c @@ -787,9 +787,6 @@ static int ubifs_mknod(struct inode *dir dbg_gen("dent '%pd' in dir ino %lu", dentry, dir->i_ino); - if (!new_valid_dev(rdev)) - return -EINVAL; - if (S_ISBLK(mode) || S_ISCHR(mode)) { dev = kmalloc(sizeof(union ubifs_dev_desc), GFP_NOFS); if (!dev) diff -puN fs/ubifs/misc.h~fs-ubifs-remove-unnecessary-new_valid_dev-check fs/ubifs/misc.h --- a/fs/ubifs/misc.h~fs-ubifs-remove-unnecessary-new_valid_dev-check +++ a/fs/ubifs/misc.h @@ -155,13 +155,8 @@ static inline int ubifs_wbuf_sync(struct */ static inline int ubifs_encode_dev(union ubifs_dev_desc *dev, dev_t rdev) { - if (new_valid_dev(rdev)) { - dev->new = cpu_to_le32(new_encode_dev(rdev)); - return sizeof(dev->new); - } else { - dev->huge = cpu_to_le64(huge_encode_dev(rdev)); - return sizeof(dev->huge); - } + dev->new = cpu_to_le32(new_encode_dev(rdev)); + return sizeof(dev->new); } /** _ Patches currently in -mm which might be from bywxiaobai@xxxxxxx are kernel-watchdog-is_hardlockup-can-be-boolean.patch mm-page_alloc-remove-unused-parameter-in-init_currently_empty_zone.patch mm-vmscan-make-inactive_anon_is_low_global-return-directly.patch mm-oom_kill-introduce-is_sysrq_oom-helper.patch mm-compaction-add-an-is_via_compact_memory-helper-function.patch mm-vmscan-make-inactive_anon-file_is_low-return-bool.patch mm-memcontrol-make-mem_cgroup_inactive_anon_is_low-return-bool.patch fs-kdev_t-remove-unused-huge_valid_dev-function.patch fs-kdev_t-old-new_valid_dev-can-be-boolean.patch fs-vfs-remove-unnecessary-new_valid_dev-check.patch fs-btrfs-remove-unnecessary-new_valid_dev-check.patch fs-exofs-remove-unnecessary-new_valid_dev-check.patch fs-ext2-remove-unnecessary-new_valid_dev-check.patch fs-ext4-remove-unnecessary-new_valid_dev-check.patch fs-f2fs-remove-unnecessary-new_valid_dev-check.patch fs-hpfs-remove-unnecessary-new_valid_dev-check.patch fs-jfs-remove-unnecessary-new_valid_dev-check.patch fs-ncpfs-remove-unnecessary-new_valid_dev-check.patch fs-nfs-remove-unnecessary-new_valid_dev-check.patch fs-nilfs2-remove-unnecessary-new_valid_dev-check.patch fs-reiserfs-remove-unnecessary-new_valid_dev-check.patch fs-stat-remove-unnecessary-new_valid_dev-check.patch fs-ubifs-remove-unnecessary-new_valid_dev-check.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