aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/file.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 15:42:58 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-08-07 15:42:58 -0400
commit3b7433b8a8a83c87972065b1852b7dcae691e464 (patch)
tree93fa2c003f8baef5ab0733b53bac77961ed5240c /fs/cifs/file.c
parent4a386c3e177ca2fbc70c9283d0b46537844763a0 (diff)
parent6ee0578b4daaea01c96b172c6aacca43fd9807a6 (diff)
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq: (55 commits) workqueue: mark init_workqueues() as early_initcall() workqueue: explain for_each_*cwq_cpu() iterators fscache: fix build on !CONFIG_SYSCTL slow-work: kill it gfs2: use workqueue instead of slow-work drm: use workqueue instead of slow-work cifs: use workqueue instead of slow-work fscache: drop references to slow-work fscache: convert operation to use workqueue instead of slow-work fscache: convert object to use workqueue instead of slow-work workqueue: fix how cpu number is stored in work->data workqueue: fix mayday_mask handling on UP workqueue: fix build problem on !CONFIG_SMP workqueue: fix locking in retry path of maybe_create_worker() async: use workqueue for worker pool workqueue: remove WQ_SINGLE_CPU and use WQ_UNBOUND instead workqueue: implement unbound workqueue workqueue: prepare for WQ_UNBOUND implementation libata: take advantage of cmwq and remove concurrency limitations workqueue: fix worker management invocation without pending works ... Fixed up conflicts in fs/cifs/* as per Tejun. Other trivial conflicts in include/linux/workqueue.h, kernel/trace/Kconfig and kernel/workqueue.c
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r--fs/cifs/file.c30
1 files changed, 13 insertions, 17 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index fa04a00d126d..db11fdef0e92 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2307,8 +2307,7 @@ static void cifs_invalidate_page(struct page *page, unsigned long offset)
2307 cifs_fscache_invalidate_page(page, &cifsi->vfs_inode); 2307 cifs_fscache_invalidate_page(page, &cifsi->vfs_inode);
2308} 2308}
2309 2309
2310static void 2310void cifs_oplock_break(struct work_struct *work)
2311cifs_oplock_break(struct slow_work *work)
2312{ 2311{
2313 struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo, 2312 struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo,
2314 oplock_break); 2313 oplock_break);
@@ -2345,33 +2344,30 @@ cifs_oplock_break(struct slow_work *work)
2345 LOCKING_ANDX_OPLOCK_RELEASE, false); 2344 LOCKING_ANDX_OPLOCK_RELEASE, false);
2346 cFYI(1, "Oplock release rc = %d", rc); 2345 cFYI(1, "Oplock release rc = %d", rc);
2347 } 2346 }
2347
2348 /*
2349 * We might have kicked in before is_valid_oplock_break()
2350 * finished grabbing reference for us. Make sure it's done by
2351 * waiting for GlobalSMSSeslock.
2352 */
2353 write_lock(&GlobalSMBSeslock);
2354 write_unlock(&GlobalSMBSeslock);
2355
2356 cifs_oplock_break_put(cfile);
2348} 2357}
2349 2358
2350static int 2359void cifs_oplock_break_get(struct cifsFileInfo *cfile)
2351cifs_oplock_break_get(struct slow_work *work)
2352{ 2360{
2353 struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo,
2354 oplock_break);
2355 mntget(cfile->mnt); 2361 mntget(cfile->mnt);
2356 cifsFileInfo_get(cfile); 2362 cifsFileInfo_get(cfile);
2357 return 0;
2358} 2363}
2359 2364
2360static void 2365void cifs_oplock_break_put(struct cifsFileInfo *cfile)
2361cifs_oplock_break_put(struct slow_work *work)
2362{ 2366{
2363 struct cifsFileInfo *cfile = container_of(work, struct cifsFileInfo,
2364 oplock_break);
2365 mntput(cfile->mnt); 2367 mntput(cfile->mnt);
2366 cifsFileInfo_put(cfile); 2368 cifsFileInfo_put(cfile);
2367} 2369}
2368 2370
2369const struct slow_work_ops cifs_oplock_break_ops = {
2370 .get_ref = cifs_oplock_break_get,
2371 .put_ref = cifs_oplock_break_put,
2372 .execute = cifs_oplock_break,
2373};
2374
2375const struct address_space_operations cifs_addr_ops = { 2371const struct address_space_operations cifs_addr_ops = {
2376 .readpage = cifs_readpage, 2372 .readpage = cifs_readpage,
2377 .readpages = cifs_readpages, 2373 .readpages = cifs_readpages,