Skip to contentSkip to conversation

nilfs2: delete unnecessary condition in nilfs_dat_translate

PATCH Applied Jiro SEKIBA 2 participants 2 messages Feb 5, 2010 – Feb 6, 2010 1 message not in the archive NILFS2 filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nilfs2: delete unnecessary condition in nilfs_dat_translate

Hi,

This is a trivial patch to delete unnecessary condition in nilfs_dat_translate.

nilfs_dat_translate() will asign translated address to *blocknrp if blocknrp is not NULL. However the condition is unneeded, because all callers of nilfs_dat_translate() pass blocknrp properly.

---
 fs/nilfs2/dat.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
fs/nilfs2/dat.c +1 -2
index 187dd07..9d1e5de 100644
@@ -388,8 +388,7 @@ int nilfs_dat_translate(struct inode *dat, __u64 vblocknr, sector_t *blocknrp)
 		ret = -ENOENT;
 		goto out;
 	}
-	if (blocknrp != NULL)
-		*blocknrp = blocknr;
+	*blocknrp = blocknr;
 
  out:
 	kunmap_atomic(kaddr, KM_USER0);
Signature · 6 lines
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 87pr4jsr9d.wl%[email protected]

#2 lore raw
Quoted 9 lines · Jiro SEKIBA

Hi,

This is a trivial patch to delete unnecessary condition in nilfs_dat_translate.

nilfs_dat_translate() will asign translated address to *blocknrp if blocknrp is not NULL. However the condition is unneeded, because all callers of nilfs_dat_translate() pass blocknrp properly.

Applied.

Ryusuke Konishi

Quoted 25 lines
---
 fs/nilfs2/dat.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
fs/nilfs2/dat.c +1 -2
index 187dd07..9d1e5de 100644
@@ -388,8 +388,7 @@ int nilfs_dat_translate(struct inode *dat, __u64 vblocknr, sector_t *blocknrp)
 		ret = -ENOENT;
 		goto out;
 	}
-	if (blocknrp != NULL)
-		*blocknrp = blocknr;
+	*blocknrp = blocknr;
 
  out:
 	kunmap_atomic(kaddr, KM_USER0);
Signature · 6 lines
1.5.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html