The patch titled Subject: ntfs: delete unnecessary checks before calling iput() has been added to the -mm tree. Its filename is ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput.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: SF Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Subject: ntfs: delete unnecessary checks before calling iput() iput() tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx> Cc: Julia Lawall <julia.lawall@xxxxxxx> Reviewed-by: Anton Altaparmakov <anton@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ntfs/super.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff -puN fs/ntfs/super.c~ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput fs/ntfs/super.c --- a/fs/ntfs/super.c~ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput +++ a/fs/ntfs/super.c @@ -2204,17 +2204,12 @@ get_ctx_vol_failed: return true; #ifdef NTFS_RW iput_usnjrnl_err_out: - if (vol->usnjrnl_j_ino) - iput(vol->usnjrnl_j_ino); - if (vol->usnjrnl_max_ino) - iput(vol->usnjrnl_max_ino); - if (vol->usnjrnl_ino) - iput(vol->usnjrnl_ino); + iput(vol->usnjrnl_j_ino); + iput(vol->usnjrnl_max_ino); + iput(vol->usnjrnl_ino); iput_quota_err_out: - if (vol->quota_q_ino) - iput(vol->quota_q_ino); - if (vol->quota_ino) - iput(vol->quota_ino); + iput(vol->quota_q_ino); + iput(vol->quota_ino); iput(vol->extend_ino); #endif /* NTFS_RW */ iput_sec_err_out: @@ -2223,8 +2218,7 @@ iput_root_err_out: iput(vol->root_ino); iput_logfile_err_out: #ifdef NTFS_RW - if (vol->logfile_ino) - iput(vol->logfile_ino); + iput(vol->logfile_ino); iput_vol_err_out: #endif /* NTFS_RW */ iput(vol->vol_ino); @@ -2254,8 +2248,7 @@ iput_mftbmp_err_out: iput(vol->mftbmp_ino); iput_mirr_err_out: #ifdef NTFS_RW - if (vol->mftmirr_ino) - iput(vol->mftmirr_ino); + iput(vol->mftmirr_ino); #endif /* NTFS_RW */ return false; } _ Patches currently in -mm which might be from elfring@xxxxxxxxxxxxxxxxxxxxx are ntfs-deletion-of-unnecessary-checks-before-the-function-call-iput.patch linux-next.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