diff for duplicates of <20100531072518.GO5483@bicker> diff --git a/a/1.txt b/N1/1.txt index f176c74..57e1678 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,5 +1,6 @@ On Sat, May 29, 2010 at 11:01:56AM -0700, Mike Fedyk wrote: -> On Sat, May 29, 2010 at 2:45 AM, Dan Carpenter <error27@gmail.com> wrote: +> On Sat, May 29, 2010 at 2:45 AM, Dan Carpenter <error27@gmail.com> wr= +ote: > > "old_inode" cannot be null here, because we dereference it > > unconditionally throughout the function. > > @@ -9,29 +10,35 @@ On Sat, May 29, 2010 at 11:01:56AM -0700, Mike Fedyk wrote: > > index fa6ccc1..0bc29be 100644 > > --- a/fs/btrfs/inode.c > > +++ b/fs/btrfs/inode.c -> > @@ -6487,10 +6487,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry, -> > * make sure the inode gets flushed if it is replacing -> > * something. -> > */ -> > - if (new_inode && new_inode->i_size && -> > - old_inode && S_ISREG(old_inode->i_mode)) { -> > + if (new_inode && new_inode->i_size && S_ISREG(old_inode->i_mode)) -> > btrfs_add_ordered_operation(trans, root, old_inode); -> > - } -> +> > @@ -6487,10 +6487,8 @@ static int btrfs_rename(struct inode *old_di= +r, struct dentry *old_dentry, +> > =A0 =A0 =A0 =A0 * make sure the inode gets flushed if it is replaci= +ng +> > =A0 =A0 =A0 =A0 * something. +> > =A0 =A0 =A0 =A0 */ +> > - =A0 =A0 =A0 if (new_inode && new_inode->i_size && +> > - =A0 =A0 =A0 =A0 =A0 old_inode && S_ISREG(old_inode->i_mode)) { +> > + =A0 =A0 =A0 if (new_inode && new_inode->i_size && S_ISREG(old_ino= +de->i_mode)) +> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0btrfs_add_ordered_operation(trans, r= +oot, old_inode); +> > - =A0 =A0 =A0 } +>=20 > I think code like this is here because there are still a lot of > features that are being added to btrfs and it's easier to have the > additional checks than continually adding and removing them as the > code changes. Right right. I understand about extra checks and api changes. But in -this case that doesn't aply. There is no way this particular check helps +this case that doesn't aply. There is no way this particular check hel= +ps now or in the future, and it just wastes time when someone is auditing for inconsistent null checking. regards, dan carpenter -- -To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in +To unsubscribe from this list: send the line "unsubscribe linux-btrfs" = +in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/a/content_digest b/N1/content_digest index c73ba61..40d3752 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,8 +1,8 @@ "ref\020100529094508.GF5483@bicker\0" "ref\0AANLkTikLkpTgkOGi8M8VL_rZRLyzbJKoKW9RiNMJenMi@mail.gmail.com\0" "From\0Dan Carpenter <error27@gmail.com>\0" - "Subject\0Re: [patch 5/11] btrfs: remove unneeded null check in\0" - "Date\0Mon, 31 May 2010 07:25:18 +0000\0" + "Subject\0Re: [patch 5/11] btrfs: remove unneeded null check in btrfs_rename()\0" + "Date\0Mon, 31 May 2010 09:25:18 +0200\0" "To\0Mike Fedyk <mfedyk@mikefedyk.com>\0" "Cc\0linux-btrfs@vger.kernel.org" Yan Zheng <zheng.yan@oracle.com> @@ -13,7 +13,8 @@ "\00:1\0" "b\0" "On Sat, May 29, 2010 at 11:01:56AM -0700, Mike Fedyk wrote:\n" - "> On Sat, May 29, 2010 at 2:45 AM, Dan Carpenter <error27@gmail.com> wrote:\n" + "> On Sat, May 29, 2010 at 2:45 AM, Dan Carpenter <error27@gmail.com> wr=\n" + "ote:\n" "> > \"old_inode\" cannot be null here, because we dereference it\n" "> > unconditionally throughout the function.\n" "> >\n" @@ -23,31 +24,37 @@ "> > index fa6ccc1..0bc29be 100644\n" "> > --- a/fs/btrfs/inode.c\n" "> > +++ b/fs/btrfs/inode.c\n" - "> > @@ -6487,10 +6487,8 @@ static int btrfs_rename(struct inode *old_dir, struct dentry *old_dentry,\n" - "> > \302\240 \302\240 \302\240 \302\240 * make sure the inode gets flushed if it is replacing\n" - "> > \302\240 \302\240 \302\240 \302\240 * something.\n" - "> > \302\240 \302\240 \302\240 \302\240 */\n" - "> > - \302\240 \302\240 \302\240 if (new_inode && new_inode->i_size &&\n" - "> > - \302\240 \302\240 \302\240 \302\240 \302\240 old_inode && S_ISREG(old_inode->i_mode)) {\n" - "> > + \302\240 \302\240 \302\240 if (new_inode && new_inode->i_size && S_ISREG(old_inode->i_mode))\n" - "> > \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240btrfs_add_ordered_operation(trans, root, old_inode);\n" - "> > - \302\240 \302\240 \302\240 }\n" - "> \n" + "> > @@ -6487,10 +6487,8 @@ static int btrfs_rename(struct inode *old_di=\n" + "r, struct dentry *old_dentry,\n" + "> > =A0 =A0 =A0 =A0 * make sure the inode gets flushed if it is replaci=\n" + "ng\n" + "> > =A0 =A0 =A0 =A0 * something.\n" + "> > =A0 =A0 =A0 =A0 */\n" + "> > - =A0 =A0 =A0 if (new_inode && new_inode->i_size &&\n" + "> > - =A0 =A0 =A0 =A0 =A0 old_inode && S_ISREG(old_inode->i_mode)) {\n" + "> > + =A0 =A0 =A0 if (new_inode && new_inode->i_size && S_ISREG(old_ino=\n" + "de->i_mode))\n" + "> > =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0btrfs_add_ordered_operation(trans, r=\n" + "oot, old_inode);\n" + "> > - =A0 =A0 =A0 }\n" + ">=20\n" "> I think code like this is here because there are still a lot of\n" "> features that are being added to btrfs and it's easier to have the\n" "> additional checks than continually adding and removing them as the\n" "> code changes.\n" "\n" "Right right. I understand about extra checks and api changes. But in\n" - "this case that doesn't aply. There is no way this particular check helps\n" + "this case that doesn't aply. There is no way this particular check hel=\n" + "ps\n" "now or in the future, and it just wastes time when someone is auditing\n" "for inconsistent null checking.\n" "\n" "regards,\n" "dan carpenter\n" "--\n" - "To unsubscribe from this list: send the line \"unsubscribe kernel-janitors\" in\n" + "To unsubscribe from this list: send the line \"unsubscribe linux-btrfs\" =\n" + "in\n" "the body of a message to majordomo@vger.kernel.org\n" More majordomo info at http://vger.kernel.org/majordomo-info.html -1dc0fc3135c9aa94e0cbef454c132a353a537bb59342f3c00d6fa112ac18deb7 +9a27702bd0c42c3fc3f9e47d708a8cafef529553614e11453edeadb5ad9e3f35
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.