| To: | xfs-oss <xfs@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] xfsprogs: remove unreachable code in libxfs_inode_alloc |
| From: | Eric Sandeen <sandeen@xxxxxxxxxx> |
| Date: | Mon, 06 Apr 2015 12:28:14 -0500 |
| Delivered-to: | xfs@xxxxxxxxxxx |
This code does:
if (!ialloc_context && !ip)
return;
// if !ip here, ialloc_context must be true
if (ialloc_context) {
...
if (!ip)
error = ENOSPC;
if (error)
return error;
// if !ip in this block we've returned
}
// so (!ip) cannot be true here
if (!ip)
error = ENOSPC;
(cherry picked this one out of Coverity reports)
Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
diff --git a/libxfs/util.c b/libxfs/util.c
index 6464a1b..49eb76d 100644
--- a/libxfs/util.c
+++ b/libxfs/util.c
@@ -700,8 +700,6 @@ libxfs_inode_alloc(
if (error)
return error;
}
- if (!ip)
- error = ENOSPC;
*ipp = ip;
return error;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] xfs_db: disallow sb UUID write on v5 filesystems, Eric Sandeen |
|---|---|
| Next by Date: | Re: [PATCH 1/8] xfs: mmap lock needs to be inside freeze protection, Brian Foster |
| Previous by Thread: | [PATCH] xfs_db: disallow sb UUID write on v5 filesystems, Eric Sandeen |
| Next by Thread: | Re: [PATCH] xfsprogs: remove unreachable code in libxfs_inode_alloc, Brian Foster |
| Indexes: | [Date] [Thread] [Top] [All Lists] |