* [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() [not found] ` <20200331204643.11262-1-jbi.octave@gmail.com> @ 2020-03-31 20:46 ` Jules Irenge 2020-04-01 10:01 ` Jan Kara 0 siblings, 1 reply; 3+ messages in thread From: Jules Irenge @ 2020-03-31 20:46 UTC (permalink / raw) To: linux-kernel Cc: boqun.feng, Alexander Viro, Matthew Wilcox, Jan Kara, open list:FILESYSTEMS VFS and infrastructure, open list:FILESYSTEM DIRECT ACCESS DAX Sparse reports a warning at wait_entry_unlocked() warning: context imbalance in wait_entry_unlocked() - unexpected unlock The root cause is the missing annotation at wait_entry_unlocked() Add the missing __releases(xa) annotation. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> --- fs/dax.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/dax.c b/fs/dax.c index 1f1f0201cad1..adcd2a57fbad 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -244,6 +244,7 @@ static void *get_unlocked_entry(struct xa_state *xas, unsigned int order) * After we call xas_unlock_irq(), we cannot touch xas->xa. */ static void wait_entry_unlocked(struct xa_state *xas, void *entry) + __releases(xa) { struct wait_exceptional_entry_queue ewait; wait_queue_head_t *wq; -- 2.24.1 _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() 2020-03-31 20:46 ` [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() Jules Irenge @ 2020-04-01 10:01 ` Jan Kara 2020-04-01 16:04 ` Jules Irenge 0 siblings, 1 reply; 3+ messages in thread From: Jan Kara @ 2020-04-01 10:01 UTC (permalink / raw) To: Jules Irenge Cc: linux-kernel, boqun.feng, Alexander Viro, Matthew Wilcox, Jan Kara, open list:FILESYSTEMS (VFS and infrastructure), open list:FILESYSTEM DIRECT ACCESS (DAX) On Tue 31-03-20 21:46:39, Jules Irenge wrote: > Sparse reports a warning at wait_entry_unlocked() > > warning: context imbalance in wait_entry_unlocked() > - unexpected unlock > > The root cause is the missing annotation at wait_entry_unlocked() > Add the missing __releases(xa) annotation. > > Signed-off-by: Jules Irenge <jbi.octave@gmail.com> > --- > fs/dax.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/fs/dax.c b/fs/dax.c > index 1f1f0201cad1..adcd2a57fbad 100644 > --- a/fs/dax.c > +++ b/fs/dax.c > @@ -244,6 +244,7 @@ static void *get_unlocked_entry(struct xa_state *xas, unsigned int order) > * After we call xas_unlock_irq(), we cannot touch xas->xa. > */ > static void wait_entry_unlocked(struct xa_state *xas, void *entry) > + __releases(xa) Thanks for the patch but is this a proper sparse annotation? I'd rather expect something like __releases(xas->xa->xa_lock) here... Honza > { > struct wait_exceptional_entry_queue ewait; > wait_queue_head_t *wq; > -- > 2.24.1 > -- Jan Kara <jack@suse.com> SUSE Labs, CR _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() 2020-04-01 10:01 ` Jan Kara @ 2020-04-01 16:04 ` Jules Irenge 0 siblings, 0 replies; 3+ messages in thread From: Jules Irenge @ 2020-04-01 16:04 UTC (permalink / raw) To: Jan Kara Cc: Jules Irenge, linux-kernel, boqun.feng, Alexander Viro, Matthew Wilcox, open list:FILESYSTEMS (VFS and infrastructure), open list:FILESYSTEM DIRECT ACCESS (DAX) On Wed, 1 Apr 2020, Jan Kara wrote: > On Tue 31-03-20 21:46:39, Jules Irenge wrote: >> Sparse reports a warning at wait_entry_unlocked() >> >> warning: context imbalance in wait_entry_unlocked() >> - unexpected unlock >> >> The root cause is the missing annotation at wait_entry_unlocked() >> Add the missing __releases(xa) annotation. >> >> Signed-off-by: Jules Irenge <jbi.octave@gmail.com> >> --- >> fs/dax.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/fs/dax.c b/fs/dax.c >> index 1f1f0201cad1..adcd2a57fbad 100644 >> --- a/fs/dax.c >> +++ b/fs/dax.c >> @@ -244,6 +244,7 @@ static void *get_unlocked_entry(struct xa_state *xas, unsigned int order) >> * After we call xas_unlock_irq(), we cannot touch xas->xa. >> */ >> static void wait_entry_unlocked(struct xa_state *xas, void *entry) >> + __releases(xa) > > Thanks for the patch but is this a proper sparse annotation? I'd rather > expect something like __releases(xas->xa->xa_lock) here... > > Honza > >> { >> struct wait_exceptional_entry_queue ewait; >> wait_queue_head_t *wq; >> -- >> 2.24.1 >> > -- > Jan Kara <jack@suse.com> > SUSE Labs, CR > Thanks for the kind reply. I learned and changed. If there is a further issue, please do not hesitate to contact me. Thanks, Jules _______________________________________________ Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org To unsubscribe send an email to linux-nvdimm-leave@lists.01.org ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-01 16:05 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <0/7> [not found] ` <20200331204643.11262-1-jbi.octave@gmail.com> 2020-03-31 20:46 ` [PATCH 3/7] dax: Add missing annotation for wait_entry_unlocked() Jules Irenge 2020-04-01 10:01 ` Jan Kara 2020-04-01 16:04 ` Jules Irenge
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).