* [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup
@ 2007-05-05 22:59 Josef 'Jeff' Sipek
2007-05-05 22:59 ` [PATCH 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
2007-05-05 22:59 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
0 siblings, 2 replies; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-05 22:59 UTC (permalink / raw)
To: torvalds, akpm; +Cc: hch, linux-kernel, linux-fsdevel
The following 2 patches are trivial cleanups to do_path_lookup in namei.c.
Since these changes are trivial, they can go into 2.6.22-rc1 without any
problems.
Josef 'Jeff' Sipek (2):
fs: Fix indentation in do_path_lookup
fs: Use path_walk in do_path_lookup
diffstat for good measure:
fs/namei.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Josef 'Jeff' Sipek.
jsipek@cs.sunysb.edu
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 1/2] fs: Fix indentation in do_path_lookup
2007-05-05 22:59 [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup Josef 'Jeff' Sipek
@ 2007-05-05 22:59 ` Josef 'Jeff' Sipek
2007-05-06 11:11 ` Christoph Hellwig
2007-05-05 22:59 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
1 sibling, 1 reply; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-05 22:59 UTC (permalink / raw)
To: torvalds, akpm
Cc: hch, linux-kernel, linux-fsdevel, Josef 'Jeff' Sipek
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/namei.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 0262594..600a4e7 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1159,7 +1159,7 @@ out:
if (likely(retval == 0)) {
if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
nd->dentry->d_inode))
- audit_inode(name, nd->dentry->d_inode);
+ audit_inode(name, nd->dentry->d_inode);
}
out_fail:
return retval;
--
1.5.0.3.1043.g4342
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] fs: Fix indentation in do_path_lookup
2007-05-05 22:59 ` [PATCH 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
@ 2007-05-06 11:11 ` Christoph Hellwig
2007-05-06 15:30 ` [PATCH] " Josef 'Jeff' Sipek
2007-05-06 16:43 ` [PATCH 1/2] " Josef Sipek
0 siblings, 2 replies; 10+ messages in thread
From: Christoph Hellwig @ 2007-05-06 11:11 UTC (permalink / raw)
To: Josef 'Jeff' Sipek
Cc: torvalds, akpm, hch, linux-kernel, linux-fsdevel
On Sat, May 05, 2007 at 06:59:39PM -0400, Josef 'Jeff' Sipek wrote:
> Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
> ---
> fs/namei.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/fs/namei.c b/fs/namei.c
> index 0262594..600a4e7 100644
> --- a/fs/namei.c
> +++ b/fs/namei.c
> @@ -1159,7 +1159,7 @@ out:
> if (likely(retval == 0)) {
> if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
> nd->dentry->d_inode))
> - audit_inode(name, nd->dentry->d_inode);
> + audit_inode(name, nd->dentry->d_inode);
> }
Actually this area should get some more changes. There should be no
likely retval == 0 branch because it only contains another branch, and
nd is guaranteed to be zero.
So it should become:
if (unlikely(!retval && !audit_dummy_context() &&
nd->dentry && nd->dentry->d_inode))
audit_inode(name, nd->dentry->d_inode);
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH] fs: Fix indentation in do_path_lookup
2007-05-06 11:11 ` Christoph Hellwig
@ 2007-05-06 15:30 ` Josef 'Jeff' Sipek
2007-05-06 16:21 ` Christoph Hellwig
2007-05-06 16:43 ` [PATCH 1/2] " Josef Sipek
1 sibling, 1 reply; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-06 15:30 UTC (permalink / raw)
To: linux-kernel
Cc: hch, torvalds, akpm, linux-fsdevel, Josef 'Jeff' Sipek
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/namei.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 0262594..48078ea 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1156,11 +1156,9 @@ static int fastcall do_path_lookup(int dfd, const char *name,
current->total_link_count = 0;
retval = link_path_walk(name, nd);
out:
- if (likely(retval == 0)) {
- if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
- nd->dentry->d_inode))
+ if (unlikely(!retval && !audit_dummy_context() && nd &&
+ nd->dentry && nd->dentry->d_inode))
audit_inode(name, nd->dentry->d_inode);
- }
out_fail:
return retval;
--
1.5.2.rc1.20.g86b9
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] fs: Fix indentation in do_path_lookup
2007-05-06 11:11 ` Christoph Hellwig
2007-05-06 15:30 ` [PATCH] " Josef 'Jeff' Sipek
@ 2007-05-06 16:43 ` Josef Sipek
2007-05-06 16:49 ` Christoph Hellwig
1 sibling, 1 reply; 10+ messages in thread
From: Josef Sipek @ 2007-05-06 16:43 UTC (permalink / raw)
To: Christoph Hellwig, Josef 'Jeff' Sipek, torvalds, akpm,
linux-kernel, linux-fsdevel
On Sun, May 06, 2007 at 12:11:24PM +0100, Christoph Hellwig wrote:
> On Sat, May 05, 2007 at 06:59:39PM -0400, Josef 'Jeff' Sipek wrote:
> > Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
> > ---
> > fs/namei.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-)
> >
> > diff --git a/fs/namei.c b/fs/namei.c
> > index 0262594..600a4e7 100644
> > --- a/fs/namei.c
> > +++ b/fs/namei.c
> > @@ -1159,7 +1159,7 @@ out:
> > if (likely(retval == 0)) {
> > if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
> > nd->dentry->d_inode))
> > - audit_inode(name, nd->dentry->d_inode);
> > + audit_inode(name, nd->dentry->d_inode);
> > }
...
> nd is guaranteed to be zero.
Should that say non-zero?
Josef "Jeff" Sipek.
--
Humans were created by water to transport it upward.
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: [PATCH 1/2] fs: Fix indentation in do_path_lookup
2007-05-06 16:43 ` [PATCH 1/2] " Josef Sipek
@ 2007-05-06 16:49 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2007-05-06 16:49 UTC (permalink / raw)
To: Josef Sipek
Cc: Christoph Hellwig, Josef 'Jeff' Sipek, torvalds, akpm,
linux-kernel, linux-fsdevel
On Sun, May 06, 2007 at 12:43:23PM -0400, Josef Sipek wrote:
> On Sun, May 06, 2007 at 12:11:24PM +0100, Christoph Hellwig wrote:
> > On Sat, May 05, 2007 at 06:59:39PM -0400, Josef 'Jeff' Sipek wrote:
> > > Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
> > > ---
> > > fs/namei.c | 2 +-
> > > 1 files changed, 1 insertions(+), 1 deletions(-)
> > >
> > > diff --git a/fs/namei.c b/fs/namei.c
> > > index 0262594..600a4e7 100644
> > > --- a/fs/namei.c
> > > +++ b/fs/namei.c
> > > @@ -1159,7 +1159,7 @@ out:
> > > if (likely(retval == 0)) {
> > > if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
> > > nd->dentry->d_inode))
> > > - audit_inode(name, nd->dentry->d_inode);
> > > + audit_inode(name, nd->dentry->d_inode);
> > > }
> ...
> > nd is guaranteed to be zero.
>
> Should that say non-zero?
Yes, sorry.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 2/2] fs: Use path_walk in do_path_lookup
2007-05-05 22:59 [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup Josef 'Jeff' Sipek
2007-05-05 22:59 ` [PATCH 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
@ 2007-05-05 22:59 ` Josef 'Jeff' Sipek
2007-05-06 11:11 ` Christoph Hellwig
1 sibling, 1 reply; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-05 22:59 UTC (permalink / raw)
To: torvalds, akpm
Cc: hch, linux-kernel, linux-fsdevel, Josef 'Jeff' Sipek
Since, path_walk sets the total_link_count to 0, and calls link_path_walk,
we can just call path_walk directly.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/namei.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 600a4e7..86f0def 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1153,8 +1153,8 @@ static int fastcall do_path_lookup(int dfd, const char *name,
fput_light(file, fput_needed);
}
- current->total_link_count = 0;
- retval = link_path_walk(name, nd);
+
+ retval = path_walk(name, nd);
out:
if (likely(retval == 0)) {
if (unlikely(!audit_dummy_context() && nd && nd->dentry &&
--
1.5.0.3.1043.g4342
^ permalink raw reply related [flat|nested] 10+ messages in thread* Re: [PATCH 2/2] fs: Use path_walk in do_path_lookup
2007-05-05 22:59 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
@ 2007-05-06 11:11 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2007-05-06 11:11 UTC (permalink / raw)
To: Josef 'Jeff' Sipek
Cc: torvalds, akpm, hch, linux-kernel, linux-fsdevel
On Sat, May 05, 2007 at 06:59:40PM -0400, Josef 'Jeff' Sipek wrote:
> Since, path_walk sets the total_link_count to 0, and calls link_path_walk,
> we can just call path_walk directly.
Ok.
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2)
@ 2007-05-06 17:47 Josef 'Jeff' Sipek
2007-05-06 17:47 ` [PATCH 2/2] fs: Use path_walk in do_path_lookup Josef 'Jeff' Sipek
0 siblings, 1 reply; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-06 17:47 UTC (permalink / raw)
To: torvalds, akpm; +Cc: hch, linux-kernel, linux-fsdevel
(For changes since V1, see the end of this email.)
The following 2 patches are trivial cleanups to do_path_lookup in namei.c.
Since these changes are trivial, they can go into 2.6.22-rc1 without any
problems.
Josef 'Jeff' Sipek (2):
fs: Fix indentation in do_path_lookup
fs: Use path_walk in do_path_lookup
diffstat for good measure:
fs/namei.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
Josef 'Jeff' Sipek.
Changes since V1:
- Fixed up audit_inode condition (hch)
^ permalink raw reply [flat|nested] 10+ messages in thread* [PATCH 2/2] fs: Use path_walk in do_path_lookup
2007-05-06 17:47 [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2) Josef 'Jeff' Sipek
@ 2007-05-06 17:47 ` Josef 'Jeff' Sipek
0 siblings, 0 replies; 10+ messages in thread
From: Josef 'Jeff' Sipek @ 2007-05-06 17:47 UTC (permalink / raw)
To: torvalds, akpm
Cc: hch, linux-kernel, linux-fsdevel, Josef 'Jeff' Sipek
Since, path_walk sets the total_link_count to 0, and calls link_path_walk,
we can just call path_walk directly.
Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
fs/namei.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/namei.c b/fs/namei.c
index 2a5c232..25aaf8c 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1156,8 +1156,8 @@ static int fastcall do_path_lookup(int dfd, const char *name,
fput_light(file, fput_needed);
}
- current->total_link_count = 0;
- retval = link_path_walk(name, nd);
+
+ retval = path_walk(name, nd);
out:
if (unlikely(!retval && !audit_dummy_context() && nd->dentry &&
nd->dentry->d_inode))
--
1.5.2.rc1.20.g86b9
^ permalink raw reply related [flat|nested] 10+ messages in thread
end of thread, other threads:[~2007-05-06 17:48 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-05-05 22:59 [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup Josef 'Jeff' Sipek
2007-05-05 22:59 ` [PATCH 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
2007-05-06 11:11 ` Christoph Hellwig
2007-05-06 15:30 ` [PATCH] " Josef 'Jeff' Sipek
2007-05-06 16:21 ` Christoph Hellwig
2007-05-06 16:43 ` [PATCH 1/2] " Josef Sipek
2007-05-06 16:49 ` Christoph Hellwig
2007-05-05 22:59 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
2007-05-06 11:11 ` Christoph Hellwig
-- strict thread matches above, loose matches on Subject: below --
2007-05-06 17:47 [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2) Josef 'Jeff' Sipek
2007-05-06 17:47 ` [PATCH 2/2] fs: Use path_walk in do_path_lookup Josef 'Jeff' Sipek
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).