* [PATCH] fs/nfs/inode.c: adjust code alignment [not found] <1375714059-29567-1-git-send-email-Julia.Lawall@lip6.fr> @ 2013-08-05 14:47 ` Julia Lawall 2013-08-05 14:59 ` Myklebust, Trond 0 siblings, 1 reply; 4+ messages in thread From: Julia Lawall @ 2013-08-05 14:47 UTC (permalink / raw) To: Trond Myklebust; +Cc: kernel-janitors, linux-nfs, linux-kernel From: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> --- This patch adjusts the code so that the alignment matches the current semantics. I have no idea if it is the intended semantics, though. Should the call to nfs_setsecurity also be under the else? fs/nfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index af6e806..d8ad685 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c @@ -463,7 +463,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh *fh, struct nfs_fattr *fattr, st unlock_new_inode(inode); } else nfs_refresh_inode(inode, fattr); - nfs_setsecurity(inode, fattr, label); + nfs_setsecurity(inode, fattr, label); dprintk("NFS: nfs_fhget(%s/%Ld fh_crc=0x%08x ct=%d)\n", inode->i_sb->s_id, (long long)NFS_FILEID(inode), ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/nfs/inode.c: adjust code alignment 2013-08-05 14:47 ` [PATCH] fs/nfs/inode.c: adjust code alignment Julia Lawall @ 2013-08-05 14:59 ` Myklebust, Trond 2013-08-06 18:04 ` Steve Dickson 0 siblings, 1 reply; 4+ messages in thread From: Myklebust, Trond @ 2013-08-05 14:59 UTC (permalink / raw) To: Julia Lawall, Steve Dickson, David Quigley Cc: kernel-janitors@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org T24gTW9uLCAyMDEzLTA4LTA1IGF0IDE2OjQ3ICswMjAwLCBKdWxpYSBMYXdhbGwgd3JvdGU6DQo+ IEZyb206IEp1bGlhIExhd2Fsb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nfs/inode.c: adjust code alignment 2013-08-05 14:59 ` Myklebust, Trond @ 2013-08-06 18:04 ` Steve Dickson 2013-08-07 1:58 ` Dave Quigley 0 siblings, 1 reply; 4+ messages in thread From: Steve Dickson @ 2013-08-06 18:04 UTC (permalink / raw) To: Myklebust, Trond Cc: Julia Lawall, David Quigley, kernel-janitors@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Hello, On 05/08/13 10:59, Myklebust, Trond wrote: > On Mon, 2013-08-05 at 16:47 +0200, Julia Lawall wrote: >> From: Julia Lawall <Julia.Lawall@lip6.fr> >> >> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> >> >> --- >> >> This patch adjusts the code so that the alignment matches the current >> semantics. I have no idea if it is the intended semantics, though. Should >> the call to nfs_setsecurity also be under the else? >> > >> fs/nfs/inode.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c >> index af6e806..d8ad685 100644 >> --- a/fs/nfs/inode.c >> +++ b/fs/nfs/inode.c >> @@ -463,7 +463,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh >> *fh, struct nfs_fattr *fattr, st >> unlock_new_inode(inode); >> } else >> nfs_refresh_inode(inode, fattr); >> - nfs_setsecurity(inode, fattr, label); >> + nfs_setsecurity(inode, fattr, label); This call to nfs_setsecurity() is not needed. The security only needs to be set when the i-node is created... steved. >> dprintk("NFS: nfs_fhget(%s/%Ld fh_crc=0x%08x ct=%d)\n", >> inode->i_sb->s_id, >> (long long)NFS_FILEID(inode), > > Hi Julia, > > Thanks for pointing this out! Given that the 'then' clause of the if > statement already calls nfs_setsecurity before unlocking the inode, I > suspect that the above _should_ really be part of the 'else' clause. > > That said, I can't see that calling nfs_setsecurity twice on the inode > can cause any unintended side-effects, so I suggest that we rather queue > the patch up for inclusion in 3.12. > Steve and Dave, any comments? > ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fs/nfs/inode.c: adjust code alignment 2013-08-06 18:04 ` Steve Dickson @ 2013-08-07 1:58 ` Dave Quigley 0 siblings, 0 replies; 4+ messages in thread From: Dave Quigley @ 2013-08-07 1:58 UTC (permalink / raw) To: Steve Dickson Cc: Myklebust, Trond, Julia Lawall, kernel-janitors@vger.kernel.org, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org On 8/6/2013 2:04 PM, Steve Dickson wrote: > Hello, > > On 05/08/13 10:59, Myklebust, Trond wrote: >> On Mon, 2013-08-05 at 16:47 +0200, Julia Lawall wrote: >>> From: Julia Lawall <Julia.Lawall@lip6.fr> >>> >>> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> >>> >>> --- >>> >>> This patch adjusts the code so that the alignment matches the current >>> semantics. I have no idea if it is the intended semantics, though. Should >>> the call to nfs_setsecurity also be under the else? >>> >> >>> fs/nfs/inode.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c >>> index af6e806..d8ad685 100644 >>> --- a/fs/nfs/inode.c >>> +++ b/fs/nfs/inode.c >>> @@ -463,7 +463,7 @@ nfs_fhget(struct super_block *sb, struct nfs_fh >>> *fh, struct nfs_fattr *fattr, st >>> unlock_new_inode(inode); >>> } else >>> nfs_refresh_inode(inode, fattr); >>> - nfs_setsecurity(inode, fattr, label); >>> + nfs_setsecurity(inode, fattr, label); > This call to nfs_setsecurity() is not needed. The security only needs > to be set when the i-node is created... > > steved. > >>> dprintk("NFS: nfs_fhget(%s/%Ld fh_crc=0x%08x ct=%d)\n", >>> inode->i_sb->s_id, >>> (long long)NFS_FILEID(inode), >> >> Hi Julia, >> >> Thanks for pointing this out! Given that the 'then' clause of the if >> statement already calls nfs_setsecurity before unlocking the inode, I >> suspect that the above _should_ really be part of the 'else' clause. >> >> That said, I can't see that calling nfs_setsecurity twice on the inode >> can cause any unintended side-effects, so I suggest that we rather queue >> the patch up for inclusion in 3.12. >> Steve and Dave, any comments? >> > I can't see why it would be needed either. I agree with Steve. We can get rid of it. Dave ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-07 2:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1375714059-29567-1-git-send-email-Julia.Lawall@lip6.fr>
2013-08-05 14:47 ` [PATCH] fs/nfs/inode.c: adjust code alignment Julia Lawall
2013-08-05 14:59 ` Myklebust, Trond
2013-08-06 18:04 ` Steve Dickson
2013-08-07 1:58 ` Dave Quigley
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).