Skip to contentSkip to conversation

ocfs2: fix a static checker warning

PATCH Superseded Gang He 3 participants 3 messages May 22, 2017 OCFS2

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Gang He

author
#0 lore raw

PATCH 1/1 ocfs2: fix a static checker warning

This patch will fix a static checker warning, this warning was caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after apply this patch, the error return value will not be NULL(zero).

---
 fs/ocfs2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/inode.c +1 -1
index 382401d..1a1e007 100644
@@ -136,7 +136,7 @@ struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno)
 struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
 			 int sysfile_type)
 {
-	int rc = 0;
+	int rc = -ESTALE;
 	struct inode *inode = NULL;
 	struct super_block *sb = osb->sb;
 	struct ocfs2_find_inode_args args;
Signature · 1 line
1.8.5.6
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Gang He

This patch will fix a static checker warning, this warning was caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after apply this patch, the error return value will not be NULL(zero).

Thanks,
Joseph

Quoted 18 lines
---
 fs/ocfs2/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/ocfs2/inode.c +1 -1
index 382401d..1a1e007 100644
@@ -136,7 +136,7 @@ struct inode *ocfs2_ilookup(struct super_block *sb, u64 blkno)
 struct inode *ocfs2_iget(struct ocfs2_super *osb, u64 blkno, unsigned flags,
 			 int sysfile_type)
 {
-	int rc = 0;
+	int rc = -ESTALE;
 	struct inode *inode = NULL;
 	struct super_block *sb = osb->sb;
 	struct ocfs2_find_inode_args args;
#2 lore raw
In reply to Gang He
Quoted 3 lines · On Mon, 22 May 2017 12:54:37 +0800 Gang He <[email protected]> wrote:

This patch will fix a static checker warning, this warning was caused by commit d56a8f32e4c662509ce50a37e78fa66c777977d3. after apply this patch, the error return value will not be NULL(zero).

When identifying another commit, please use the form

d56a8f32e4c6 ("ocfs2: check/fix inode block for online file check")

And when fixing warnings such as this, please quote the warning in full and identify which checker tool generated that warning.