fix a compiling warning
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 fix a compiling warning
Hi Larry,
'had_lock' will be initialized by ocfs2_inode_lock_tracker(), and the 'bail' branch above won't use it either as 'inode_locked' is still zero.
thanks,
Jun
Quoted 21 lines · Larry Chen
The variable
had_lockmight be used uninitialized.Signed-off-by Larry Chen <[email protected]>--- fs/ocfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ocfs2/file.c +1
-1@@ -1133,7 +1133,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)handle_t *handle =NULL ;struct dquot *transfer_to[MAXQUOTAS ] = { };int qtype; -int had_lock; +int had_lock =0 ;struct ocfs2_lock_holder oh; trace_ocfs2_setattr(inode, dentry,
PATCH 1/1 fix a compiling warning
Hi Jun
Yeah,I know your logic is right.
It's just a compile warning that made me feel uncomfortable.
:)
Quoted 30 lines · piaojun
Hi Larry,
'
had_lock' will be initialized byocfs2_inode_lock_tracker(), and the 'bail' branch above won't use it either as 'inode_locked' is still zero.thanks,
JunQuoted 21 lines · Larry Chen
The variable
had_lockmight be used uninitialized.Signed-off-by Larry Chen <[email protected]>--- fs/ocfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ocfs2/file.c +1
-1@@ -1133,7 +1133,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)handle_t *handle =NULL ;struct dquot *transfer_to[MAXQUOTAS ] = { };int qtype; -int had_lock; +int had_lock =0 ;struct ocfs2_lock_holder oh; trace_ocfs2_setattr(inode, dentry,
PATCH 1/1 fix a compiling warning
Hi Larry,
It would be better for you to paste the compilation warning and gcc version.
So we can justify if it is deserved to be fixed.
Thanks,
Changwei
Quoted 45 lines · Larry Chen
Hi Jun
Yeah,I know your logic is right.
It's just a compile warning that made me feel uncomfortable.:)
Quoted 28 lines · piaojun
Hi Larry,
'
had_lock' will be initialized byocfs2_inode_lock_tracker(), and the 'bail' branch above won't use it either as 'inode_locked' is still zero.thanks,
JunQuoted 19 lines · Larry Chen
The variable
had_lockmight be used uninitialized.Signed-off-by Larry Chen <[email protected]>--- fs/ocfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/ocfs2/file.c +1
-1@@ -1133,7 +1133,7 @@ int ocfs2_setattr(struct dentry *dentry, struct iattr *attr)handle_t *handle =NULL ;struct dquot *transfer_to[MAXQUOTAS ] = { };int qtype; -int had_lock; +int had_lock =0 ;struct ocfs2_lock_holder oh;Quoted 2 lines
fs/ocfs2/file.c int ocfs2_setattr(struct dentry *dentry, struct iattr *attr) · line 1139
Quoted 2 lines
fs/ocfs2/file.c +0
-0trace_ocfs2_setattr(inode, dentry,_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
https://oss.oracle.com/mailman/listinfo/ocfs2-devel