* [Ocfs2-devel] [PATCH] fix a compiling warning [not found] <20180506094903.4331-1-lchen@suse.com> @ 2018-05-07 0:52 ` piaojun 2018-05-07 3:06 ` Larry Chen 0 siblings, 1 reply; 3+ messages in thread From: piaojun @ 2018-05-07 0:52 UTC (permalink / raw) To: ocfs2-devel 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 On 2018/5/6 17:49, Larry Chen wrote: > The variable had_lock might be used uninitialized. > > Signed-off-by: Larry Chen <lchen@suse.com> > --- > fs/ocfs2/file.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c > index 6ee94bc23f5b..50f17f56db36 100644 > --- a/fs/ocfs2/file.c > +++ b/fs/ocfs2/file.c > @@ -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, > ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Ocfs2-devel] [PATCH] fix a compiling warning 2018-05-07 0:52 ` [Ocfs2-devel] [PATCH] fix a compiling warning piaojun @ 2018-05-07 3:06 ` Larry Chen 2018-05-08 15:10 ` Changwei Ge 0 siblings, 1 reply; 3+ messages in thread From: Larry Chen @ 2018-05-07 3:06 UTC (permalink / raw) To: ocfs2-devel Hi Jun Yeah,I know your logic is right. It's just a compile warning that made me feel uncomfortable. :) On 05/07/2018 08:52 AM, piaojun wrote: > 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 > > On 2018/5/6 17:49, Larry Chen wrote: >> The variable had_lock might be used uninitialized. >> >> Signed-off-by: Larry Chen <lchen@suse.com> >> --- >> fs/ocfs2/file.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c >> index 6ee94bc23f5b..50f17f56db36 100644 >> --- a/fs/ocfs2/file.c >> +++ b/fs/ocfs2/file.c >> @@ -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, >> ^ permalink raw reply [flat|nested] 3+ messages in thread
* [Ocfs2-devel] [PATCH] fix a compiling warning 2018-05-07 3:06 ` Larry Chen @ 2018-05-08 15:10 ` Changwei Ge 0 siblings, 0 replies; 3+ messages in thread From: Changwei Ge @ 2018-05-08 15:10 UTC (permalink / raw) To: ocfs2-devel 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 On 2018/5/7 11:06 AM, Larry Chen wrote: > Hi Jun > > Yeah,I know your logic is right. > It's just a compile warning that made me feel uncomfortable. > > :) > > > > On 05/07/2018 08:52 AM, piaojun wrote: >> 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 >> >> On 2018/5/6 17:49, Larry Chen wrote: >>> The variable had_lock might be used uninitialized. >>> >>> Signed-off-by: Larry Chen <lchen@suse.com> >>> --- >>> fs/ocfs2/file.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c >>> index 6ee94bc23f5b..50f17f56db36 100644 >>> --- a/fs/ocfs2/file.c >>> +++ b/fs/ocfs2/file.c >>> @@ -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, >>> > > _______________________________________________ > Ocfs2-devel mailing list > Ocfs2-devel at oss.oracle.com > https://oss.oracle.com/mailman/listinfo/ocfs2-devel ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-08 15:10 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180506094903.4331-1-lchen@suse.com>
2018-05-07 0:52 ` [Ocfs2-devel] [PATCH] fix a compiling warning piaojun
2018-05-07 3:06 ` Larry Chen
2018-05-08 15:10 ` Changwei Ge
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.