diff mbox

[1/7] sunrpc: remove __rcu annotation from struct gss_cl_ctx->gc_gss_ctx

Message ID 1405303064-9102-2-git-send-email-jlayton@primarydata.com (mailing list archive)
State New, archived
Headers show

Commit Message

Jeff Layton July 14, 2014, 1:57 a.m. UTC
Commit 5b22216e11f7 (nfs: __rcu annotations) added a __rcu annotation to
the gc_gss_ctx field. I see no rationale for adding that though, as that
field does not seem to be managed via RCU at all.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
---
 include/linux/sunrpc/auth_gss.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Arnd Bergmann July 14, 2014, 2:23 p.m. UTC | #1
On Sunday 13 July 2014 21:57:38 Jeff Layton wrote:
> 
> Commit 5b22216e11f7 (nfs: __rcu annotations) added a __rcu annotation to
> the gc_gss_ctx field. I see no rationale for adding that though, as that
> field does not seem to be managed via RCU at all.
> 
> Cc: Arnd Bergmann <arnd@arndb.de>
> Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
> Signed-off-by: Jeff Layton <jlayton@primarydata.com>

Unfortunately, it's been too long ago for me to remember what led to me
adding it. I also don't see a reason for it in today's code, but I don't
know if the code has changed, if I made a mistake then, or if it's actually
needed for some reason I don't see.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jeff Layton July 14, 2014, 3:02 p.m. UTC | #2
On Mon, 14 Jul 2014 16:23:53 +0200
Arnd Bergmann <arnd@arndb.de> wrote:

> On Sunday 13 July 2014 21:57:38 Jeff Layton wrote:
> > 
> > Commit 5b22216e11f7 (nfs: __rcu annotations) added a __rcu annotation to
> > the gc_gss_ctx field. I see no rationale for adding that though, as that
> > field does not seem to be managed via RCU at all.
> > 
> > Cc: Arnd Bergmann <arnd@arndb.de>
> > Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
> > Signed-off-by: Jeff Layton <jlayton@primarydata.com>
> 
> Unfortunately, it's been too long ago for me to remember what led to me
> adding it. I also don't see a reason for it in today's code, but I don't
> know if the code has changed, if I made a mistake then, or if it's actually
> needed for some reason I don't see.
> 

Darn, I was hoping you would remember... ;)

I don't think the code that manipulates this field has changed
substantially since then, but I'm far from certain either. This field
does live in a structure that is RCU managed, so maybe that was part of
the rationale?

In any case, we're just removing the annotation here so this shouldn't
materially harm anything, AFAICT.
Arnd Bergmann July 14, 2014, 3:29 p.m. UTC | #3
On Monday 14 July 2014 11:02:02 Jeff Layton wrote:
> On Mon, 14 Jul 2014 16:23:53 +0200
> Arnd Bergmann <arnd@arndb.de> wrote:
> 
> > On Sunday 13 July 2014 21:57:38 Jeff Layton wrote:
> > > 
> > > Commit 5b22216e11f7 (nfs: __rcu annotations) added a __rcu annotation to
> > > the gc_gss_ctx field. I see no rationale for adding that though, as that
> > > field does not seem to be managed via RCU at all.
> > > 
> > > Cc: Arnd Bergmann <arnd@arndb.de>
> > > Cc: Paul McKenney <paulmck@linux.vnet.ibm.com>
> > > Signed-off-by: Jeff Layton <jlayton@primarydata.com>
> > 
> > Unfortunately, it's been too long ago for me to remember what led to me
> > adding it. I also don't see a reason for it in today's code, but I don't
> > know if the code has changed, if I made a mistake then, or if it's actually
> > needed for some reason I don't see.
> > 
> 
> Darn, I was hoping you would remember... 
> 
> I don't think the code that manipulates this field has changed
> substantially since then, but I'm far from certain either. This field
> does live in a structure that is RCU managed, so maybe that was part of
> the rationale?
> 
> In any case, we're just removing the annotation here so this shouldn't
> materially harm anything, AFAICT.
> 

All the annotations I did were the results of building with sparse and
looking at the warnings. If you see fewer warnings after your patch
than before, than it's moving into the right direction ;-)

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/include/linux/sunrpc/auth_gss.h b/include/linux/sunrpc/auth_gss.h
index cbc6875fb9cf..36eebc451b41 100644
--- a/include/linux/sunrpc/auth_gss.h
+++ b/include/linux/sunrpc/auth_gss.h
@@ -69,7 +69,7 @@  struct gss_cl_ctx {
 	enum rpc_gss_proc	gc_proc;
 	u32			gc_seq;
 	spinlock_t		gc_seq_lock;
-	struct gss_ctx __rcu	*gc_gss_ctx;
+	struct gss_ctx		*gc_gss_ctx;
 	struct xdr_netobj	gc_wire_ctx;
 	struct xdr_netobj	gc_acceptor;
 	u32			gc_win;