diff options
author | Jeff Layton <jlayton@primarydata.com> | 2015-01-16 23:05:57 +0300 |
---|---|---|
committer | Jeff Layton <jeff.layton@primarydata.com> | 2015-01-17 00:08:49 +0300 |
commit | 6109c85037e53443f29fd39c0de69f578a1cf285 (patch) | |
tree | 56823d1615acbba20c858eed9d16cf443cd55872 /fs/cifs/file.c | |
parent | a7231a97467d5a0c36f82f581c76c12c034e4b80 (diff) | |
download | linux-6109c85037e53443f29fd39c0de69f578a1cf285.tar.xz |
locks: add a dedicated spinlock to protect i_flctx lists
We can now add a dedicated spinlock without expanding struct inode.
Change to using that to protect the various i_flctx lists.
Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Acked-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index ea78f6f81ce2..b65166eb111e 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -1136,11 +1136,11 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile) if (!flctx) goto out; - spin_lock(&inode->i_lock); + spin_lock(&flctx->flc_lock); list_for_each(el, &flctx->flc_posix) { count++; } - spin_unlock(&inode->i_lock); + spin_unlock(&flctx->flc_lock); INIT_LIST_HEAD(&locks_to_send); @@ -1159,7 +1159,7 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile) } el = locks_to_send.next; - spin_lock(&inode->i_lock); + spin_lock(&flctx->flc_lock); list_for_each_entry(flock, &flctx->flc_posix, fl_list) { if (el == &locks_to_send) { /* @@ -1181,7 +1181,7 @@ cifs_push_posix_locks(struct cifsFileInfo *cfile) lck->type = type; lck->offset = flock->fl_start; } - spin_unlock(&inode->i_lock); + spin_unlock(&flctx->flc_lock); list_for_each_entry_safe(lck, tmp, &locks_to_send, llist) { int stored_rc; |