* [PATCH 0/3] locks: trivial locks.c patches
@ 2013-08-14 12:25 Jeff Layton
2013-08-14 12:25 ` [PATCH 1/3] locks: clean up comment typo Jeff Layton
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jeff Layton @ 2013-08-14 12:25 UTC (permalink / raw)
To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Matthew Wilcox
A few reasonably trivial patches for locks.c. Al, can you apply these
for 3.12?
Jeff Layton (3):
locks: clean up comment typo
locks: remove "inline" qualifier from fl_link manipulation functions
locks: add __acquires and __releases annotations to locks_start and
locks_stop
fs/locks.c | 16 +++++++---------
1 file changed, 7 insertions(+), 9 deletions(-)
--
1.8.3.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] locks: clean up comment typo
2013-08-14 12:25 [PATCH 0/3] locks: trivial locks.c patches Jeff Layton
@ 2013-08-14 12:25 ` Jeff Layton
2013-08-14 12:25 ` [PATCH 2/3] locks: remove "inline" qualifier from fl_link manipulation functions Jeff Layton
2013-08-14 12:25 ` [PATCH 3/3] locks: add __acquires and __releases annotations to locks_start and locks_stop Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2013-08-14 12:25 UTC (permalink / raw)
To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Matthew Wilcox
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/locks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/locks.c b/fs/locks.c
index a99adec..9f28359 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -581,7 +581,7 @@ static void locks_delete_block(struct file_lock *waiter)
* it seems like the reasonable thing to do.
*
* Must be called with both the i_lock and blocked_lock_lock held. The fl_block
- * list itself is protected by the file_lock_list, but by ensuring that the
+ * list itself is protected by the blocked_lock_lock, but by ensuring that the
* i_lock is also held on insertions we can avoid taking the blocked_lock_lock
* in some cases when we see that the fl_block list is empty.
*/
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] locks: remove "inline" qualifier from fl_link manipulation functions
2013-08-14 12:25 [PATCH 0/3] locks: trivial locks.c patches Jeff Layton
2013-08-14 12:25 ` [PATCH 1/3] locks: clean up comment typo Jeff Layton
@ 2013-08-14 12:25 ` Jeff Layton
2013-08-14 12:25 ` [PATCH 3/3] locks: add __acquires and __releases annotations to locks_start and locks_stop Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2013-08-14 12:25 UTC (permalink / raw)
To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Matthew Wilcox
It's best to let the compiler decide that.
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/locks.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/locks.c b/fs/locks.c
index 9f28359..b1e5bfe 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -511,8 +511,7 @@ static int posix_same_owner(struct file_lock *fl1, struct file_lock *fl2)
}
/* Must be called with the i_lock held! */
-static inline void
-locks_insert_global_locks(struct file_lock *fl)
+static void locks_insert_global_locks(struct file_lock *fl)
{
lg_local_lock(&file_lock_lglock);
fl->fl_link_cpu = smp_processor_id();
@@ -521,8 +520,7 @@ locks_insert_global_locks(struct file_lock *fl)
}
/* Must be called with the i_lock held! */
-static inline void
-locks_delete_global_locks(struct file_lock *fl)
+static void locks_delete_global_locks(struct file_lock *fl)
{
/*
* Avoid taking lock if already unhashed. This is safe since this check
@@ -544,14 +542,12 @@ posix_owner_key(struct file_lock *fl)
return (unsigned long)fl->fl_owner;
}
-static inline void
-locks_insert_global_blocked(struct file_lock *waiter)
+static void locks_insert_global_blocked(struct file_lock *waiter)
{
hash_add(blocked_hash, &waiter->fl_link, posix_owner_key(waiter));
}
-static inline void
-locks_delete_global_blocked(struct file_lock *waiter)
+static void locks_delete_global_blocked(struct file_lock *waiter)
{
hash_del(&waiter->fl_link);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] locks: add __acquires and __releases annotations to locks_start and locks_stop
2013-08-14 12:25 [PATCH 0/3] locks: trivial locks.c patches Jeff Layton
2013-08-14 12:25 ` [PATCH 1/3] locks: clean up comment typo Jeff Layton
2013-08-14 12:25 ` [PATCH 2/3] locks: remove "inline" qualifier from fl_link manipulation functions Jeff Layton
@ 2013-08-14 12:25 ` Jeff Layton
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Layton @ 2013-08-14 12:25 UTC (permalink / raw)
To: Al Viro; +Cc: linux-fsdevel, linux-kernel, Matthew Wilcox
...to make sparse happy.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/locks.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/locks.c b/fs/locks.c
index b1e5bfe..b1e321e 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2390,6 +2390,7 @@ static int locks_show(struct seq_file *f, void *v)
}
static void *locks_start(struct seq_file *f, loff_t *pos)
+ __acquires(&blocked_lock_lock)
{
struct locks_iterator *iter = f->private;
@@ -2408,6 +2409,7 @@ static void *locks_next(struct seq_file *f, void *v, loff_t *pos)
}
static void locks_stop(struct seq_file *f, void *v)
+ __releases(&blocked_lock_lock)
{
spin_unlock(&blocked_lock_lock);
lg_global_unlock(&file_lock_lglock);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-14 12:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-14 12:25 [PATCH 0/3] locks: trivial locks.c patches Jeff Layton
2013-08-14 12:25 ` [PATCH 1/3] locks: clean up comment typo Jeff Layton
2013-08-14 12:25 ` [PATCH 2/3] locks: remove "inline" qualifier from fl_link manipulation functions Jeff Layton
2013-08-14 12:25 ` [PATCH 3/3] locks: add __acquires and __releases annotations to locks_start and locks_stop Jeff Layton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.