diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-04-11 01:54:55 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-04-11 09:18:48 -0400 |
commit | d713311464bcca73c990d1a1b5c9467eae87f5b4 (patch) | |
tree | d049e9655bebed5212cd3534961d354e51c2769f /fs/fuse/fuse_i.h | |
parent | 0720b315976447cba3f0c3e211223b8cb82b0f93 (diff) |
[PATCH] fuse: use a per-mount spinlock
Remove the global spinlock in favor of a per-mount one.
This patch is basically find & replace. The difficult part has already been
done by the previous patch.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/fuse/fuse_i.h')
-rw-r--r-- | fs/fuse/fuse_i.h | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/fs/fuse/fuse_i.h b/fs/fuse/fuse_i.h index e5cb46b78437..6ed812fd6200 100644 --- a/fs/fuse/fuse_i.h +++ b/fs/fuse/fuse_i.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | FUSE: Filesystem in Userspace | 2 | FUSE: Filesystem in Userspace |
3 | Copyright (C) 2001-2005 Miklos Szeredi <miklos@szeredi.hu> | 3 | Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> |
4 | 4 | ||
5 | This program can be distributed under the terms of the GNU GPL. | 5 | This program can be distributed under the terms of the GNU GPL. |
6 | See the file COPYING. | 6 | See the file COPYING. |
@@ -144,7 +144,7 @@ struct fuse_req { | |||
144 | /* | 144 | /* |
145 | * The following bitfields are either set once before the | 145 | * The following bitfields are either set once before the |
146 | * request is queued or setting/clearing them is protected by | 146 | * request is queued or setting/clearing them is protected by |
147 | * fuse_lock | 147 | * fuse_conn->lock |
148 | */ | 148 | */ |
149 | 149 | ||
150 | /** True if the request has reply */ | 150 | /** True if the request has reply */ |
@@ -213,6 +213,9 @@ struct fuse_req { | |||
213 | * unmounted. | 213 | * unmounted. |
214 | */ | 214 | */ |
215 | struct fuse_conn { | 215 | struct fuse_conn { |
216 | /** Lock protecting accessess to members of this structure */ | ||
217 | spinlock_t lock; | ||
218 | |||
216 | /** The user id for this mount */ | 219 | /** The user id for this mount */ |
217 | uid_t user_id; | 220 | uid_t user_id; |
218 | 221 | ||
@@ -352,21 +355,6 @@ static inline u64 get_node_id(struct inode *inode) | |||
352 | extern const struct file_operations fuse_dev_operations; | 355 | extern const struct file_operations fuse_dev_operations; |
353 | 356 | ||
354 | /** | 357 | /** |
355 | * This is the single global spinlock which protects FUSE's structures | ||
356 | * | ||
357 | * The following data is protected by this lock: | ||
358 | * | ||
359 | * - the private_data field of the device file | ||
360 | * - the s_fs_info field of the super block | ||
361 | * - unused_list, pending, processing lists in fuse_conn | ||
362 | * - background list in fuse_conn | ||
363 | * - the unique request ID counter reqctr in fuse_conn | ||
364 | * - the sb (super_block) field in fuse_conn | ||
365 | * - the file (device file) field in fuse_conn | ||
366 | */ | ||
367 | extern spinlock_t fuse_lock; | ||
368 | |||
369 | /** | ||
370 | * Get a filled in inode | 358 | * Get a filled in inode |
371 | */ | 359 | */ |
372 | struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, | 360 | struct inode *fuse_iget(struct super_block *sb, unsigned long nodeid, |
@@ -490,7 +478,7 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req); | |||
490 | /** | 478 | /** |
491 | * Release inodes and file associated with background request | 479 | * Release inodes and file associated with background request |
492 | */ | 480 | */ |
493 | void fuse_release_background(struct fuse_req *req); | 481 | void fuse_release_background(struct fuse_conn *fc, struct fuse_req *req); |
494 | 482 | ||
495 | /* Abort all requests */ | 483 | /* Abort all requests */ |
496 | void fuse_abort_conn(struct fuse_conn *fc); | 484 | void fuse_abort_conn(struct fuse_conn *fc); |