* [PATCH] locks: kill redundant local variable
@ 2007-07-11 13:14 Trond Myklebust
0 siblings, 0 replies; only message in thread
From: Trond Myklebust @ 2007-07-11 13:14 UTC (permalink / raw)
To: Linus Torvalds; +Cc: nfs, linux-kernel, nfsv4
From: \"J. Bruce Fields\" <bfields@fieldses.org>
There's no need for another variable local to this loop; we can use the
variable (of the same name!) already declared at the top of the function,
and not used till later (at which point it's initialized, so this is safe).
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
---
fs/locks.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 431a8b8..2e8f21b 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -823,7 +823,7 @@ static int __posix_lock_file(struct inode *inode, struct file_lock *request, str
lock_kernel();
if (request->fl_type != F_UNLCK) {
for_each_lock(inode, before) {
- struct file_lock *fl = *before;
+ fl = *before;
if (!IS_POSIX(fl))
continue;
if (!posix_locks_conflict(request, fl))
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-11 13:34 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-11 13:14 [PATCH] locks: kill redundant local variable Trond Myklebust
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®