Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1515039 > unrolled thread

[PATCH V2] btrfs: Remove some dead code

Started byChristophe JAILLET <christophe.jaillet@wanadoo.fr>
First post2016-11-04 08:10 +0100
Last post2016-11-07 17:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V2] btrfs: Remove some dead code Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-11-04 08:10 +0100
    Re: [PATCH V2] btrfs: Remove some dead code David Sterba <dsterba@suse.cz> - 2016-11-07 17:20 +0100

#1515039 — [PATCH V2] btrfs: Remove some dead code

FromChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Date2016-11-04 08:10 +0100
Subject[PATCH V2] btrfs: Remove some dead code
Message-ID<szGNr-6VD-7@gated-at.bofh.it>
'btrfs_iget()' can not return NULL, so this test can be removed.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
V1 --> v2: fix the patch description
---
 fs/btrfs/free-space-cache.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index e4b48f377d3a..afd8b0c10acd 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -75,8 +75,6 @@ static struct inode *__lookup_free_space_inode(struct btrfs_root *root,
 	btrfs_release_path(path);
 
 	inode = btrfs_iget(root->fs_info->sb, &location, root, NULL);
-	if (!inode)
-		return ERR_PTR(-ENOENT);
 	if (IS_ERR(inode))
 		return inode;
 	if (is_bad_inode(inode)) {
-- 
2.9.3

[toc] | [next] | [standalone]


#1516286

FromDavid Sterba <dsterba@suse.cz>
Date2016-11-07 17:20 +0100
Message-ID<sAUOl-5sm-25@gated-at.bofh.it>
In reply to#1515039
On Fri, Nov 04, 2016 at 08:02:35AM +0100, Christophe JAILLET wrote:
> 'btrfs_iget()' can not return NULL, so this test can be removed.
> 
> Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>

Patch replaced, I've edited the subject to be a bit more specific.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web