diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-10-26 16:55:40 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-27 15:39:39 -0400 |
commit | 763641d81202834e9d64de2019d1edec12868f4f (patch) | |
tree | cabbf932e3f6676bfbce6be27744795700011bfb /fs/lockd/svc.c | |
parent | f9ba5375a8aae4aeea6be15df77e24707a429812 (diff) |
lockd: push lock_flocks down
lockd should use lock_flocks() instead of lock_kernel()
to lock against posix locks accessing the i_flock list.
This is a prerequisite to turning lock_flocks into a
spinlock.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/lockd/svc.c')
-rw-r--r-- | fs/lockd/svc.c | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index b13aabc12298..abfff9d7979d 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
@@ -22,7 +22,6 @@ | |||
22 | #include <linux/in.h> | 22 | #include <linux/in.h> |
23 | #include <linux/uio.h> | 23 | #include <linux/uio.h> |
24 | #include <linux/smp.h> | 24 | #include <linux/smp.h> |
25 | #include <linux/smp_lock.h> | ||
26 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
27 | #include <linux/kthread.h> | 26 | #include <linux/kthread.h> |
28 | #include <linux/freezer.h> | 27 | #include <linux/freezer.h> |
@@ -130,15 +129,6 @@ lockd(void *vrqstp) | |||
130 | 129 | ||
131 | dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n"); | 130 | dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n"); |
132 | 131 | ||
133 | /* | ||
134 | * FIXME: it would be nice if lockd didn't spend its entire life | ||
135 | * running under the BKL. At the very least, it would be good to | ||
136 | * have someone clarify what it's intended to protect here. I've | ||
137 | * seen some handwavy posts about posix locking needing to be | ||
138 | * done under the BKL, but it's far from clear. | ||
139 | */ | ||
140 | lock_kernel(); | ||
141 | |||
142 | if (!nlm_timeout) | 132 | if (!nlm_timeout) |
143 | nlm_timeout = LOCKD_DFLT_TIMEO; | 133 | nlm_timeout = LOCKD_DFLT_TIMEO; |
144 | nlmsvc_timeout = nlm_timeout * HZ; | 134 | nlmsvc_timeout = nlm_timeout * HZ; |
@@ -195,7 +185,6 @@ lockd(void *vrqstp) | |||
195 | if (nlmsvc_ops) | 185 | if (nlmsvc_ops) |
196 | nlmsvc_invalidate_all(); | 186 | nlmsvc_invalidate_all(); |
197 | nlm_shutdown_hosts(); | 187 | nlm_shutdown_hosts(); |
198 | unlock_kernel(); | ||
199 | return 0; | 188 | return 0; |
200 | } | 189 | } |
201 | 190 | ||