linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ 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] 4+ messages in thread

* [PATCH 1/2] fs: Fix indentation 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
  2007-05-06 17:47 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
  2007-05-06 21:20 ` [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2) Christoph Hellwig
  2 siblings, 0 replies; 4+ 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

Signed-off-by: Josef 'Jeff' Sipek <jsipek@cs.sunysb.edu>
---
 fs/namei.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/fs/namei.c b/fs/namei.c
index 7a98676..2a5c232 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1159,11 +1159,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 &&
+	if (unlikely(!retval && !audit_dummy_context() && 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] 4+ 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 ` [PATCH 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
@ 2007-05-06 17:47 ` Josef 'Jeff' Sipek
  2007-05-06 21:20 ` [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2) Christoph Hellwig
  2 siblings, 0 replies; 4+ 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] 4+ messages in thread

* Re: [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2)
  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 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
  2007-05-06 17:47 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
@ 2007-05-06 21:20 ` Christoph Hellwig
  2 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2007-05-06 21:20 UTC (permalink / raw)
  To: Josef 'Jeff' Sipek
  Cc: torvalds, akpm, hch, linux-kernel, linux-fsdevel

On Sun, May 06, 2007 at 01:47:54PM -0400, Josef 'Jeff' Sipek wrote:
> (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

Ok for both patches.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-05-06 21:20 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 1/2] fs: Fix indentation in do_path_lookup Josef 'Jeff' Sipek
2007-05-06 17:47 ` [PATCH 2/2] fs: Use path_walk " Josef 'Jeff' Sipek
2007-05-06 21:20 ` [PATCH 0/2] [TRIVIAL] Small cleanups for do_path_lookup (V2) Christoph Hellwig

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).