diff options
author | Sasha Levin <sasha.levin@oracle.com> | 2016-01-07 23:49:51 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-01-09 08:57:21 +0100 |
commit | 8f5fed1e917588f946ad8882bd47a4093db0ff4c (patch) | |
tree | 8b13a8cb4d56e4442e1cb4cfe838e95dbce806f0 /fs/9p/cache.c | |
parent | proc: add a reschedule point in proc_readfd_common() (diff) | |
download | linux-8f5fed1e917588f946ad8882bd47a4093db0ff4c.tar.xz linux-8f5fed1e917588f946ad8882bd47a4093db0ff4c.zip |
fs/9p: use fscache mutex rather than spinlock
We may sleep inside a the lock, so use a mutex rather than spinlock.
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/9p/cache.c')
-rw-r--r-- | fs/9p/cache.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/9p/cache.c b/fs/9p/cache.c index a69260f27555..103ca5e1267b 100644 --- a/fs/9p/cache.c +++ b/fs/9p/cache.c @@ -243,14 +243,14 @@ void v9fs_cache_inode_set_cookie(struct inode *inode, struct file *filp) if (!v9inode->fscache) return; - spin_lock(&v9inode->fscache_lock); + mutex_lock(&v9inode->fscache_lock); if ((filp->f_flags & O_ACCMODE) != O_RDONLY) v9fs_cache_inode_flush_cookie(inode); else v9fs_cache_inode_get_cookie(inode); - spin_unlock(&v9inode->fscache_lock); + mutex_unlock(&v9inode->fscache_lock); } void v9fs_cache_inode_reset_cookie(struct inode *inode) @@ -264,7 +264,7 @@ void v9fs_cache_inode_reset_cookie(struct inode *inode) old = v9inode->fscache; - spin_lock(&v9inode->fscache_lock); + mutex_lock(&v9inode->fscache_lock); fscache_relinquish_cookie(v9inode->fscache, 1); v9ses = v9fs_inode2v9ses(inode); @@ -274,7 +274,7 @@ void v9fs_cache_inode_reset_cookie(struct inode *inode) p9_debug(P9_DEBUG_FSC, "inode %p revalidating cookie old %p new %p\n", inode, old, v9inode->fscache); - spin_unlock(&v9inode->fscache_lock); + mutex_unlock(&v9inode->fscache_lock); } int __v9fs_fscache_release_page(struct page *page, gfp_t gfp) |