David Howells
91c7fbbf63
FS-Cache: Clear remaining page count on retrieval cancellation
Provide fscache_cancel_op() with a pointer to a function it should invoke under
lock if it cancels an operation.
Use this to clear the remaining page count upon cancellation of a pending
retrieval operation so that fscache_release_retrieval_op() doesn't get an
assertion failure (see below). This can happen when a signal occurs, say from
CTRL-C being pressed during data retrieval.
FS-Cache: Assertion failed
3 == 0 is false
------------[ cut here ]------------
kernel BUG at fs/fscache/page.c:237!
invalid opcode: 0000 [#641] SMP
Modules linked in: cachefiles(F) nfsv4(F) nfsv3(F) nfsv2(F) nfs(F) fscache(F) auth_rpcgss(F) nfs_acl(F) lockd(F) sunrpc(F)
CPU 0
Pid: 6075, comm: slurp-q Tainted: GF D 3.7.0-rc8-fsdevel+ #411 /DG965RY
RIP: 0010:[<ffffffffa007f328>] [<ffffffffa007f328>] fscache_release_retrieval_op+0x75/0xff [fscache]
RSP: 0000:ffff88001c6d7988 EFLAGS: 00010296
RAX: 000000000000000f RBX: ffff880014cdfe00 RCX: ffffffff6c102000
RDX: ffffffff8102d1ad RSI: ffffffff6c102000 RDI: ffffffff8102d1d6
RBP: ffff88001c6d7998 R08: 0000000000000002 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 00000000fffffe00
R13: ffff88001c6d7ab4 R14: ffff88001a8638a0 R15: ffff88001552b190
FS: 00007f877aaf0700(0000) GS:ffff88003bc00000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 00007fff11378fd2 CR3: 000000001c6c6000 CR4: 00000000000007f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process slurp-q (pid: 6075, threadinfo ffff88001c6d6000, task ffff88001c6c4080)
Stack:
ffffffffa007ec07 ffff880014cdfe00 ffff88001c6d79c8 ffffffffa007db4d
ffffffffa007ec07 ffff880014cdfe00 00000000fffffe00 ffff88001c6d7ab4
ffff88001c6d7a38 ffffffffa008116d 0000000000000000 ffff88001c6c4080
Call Trace:
[<ffffffffa007ec07>] ? fscache_cancel_op+0x194/0x1cf [fscache]
[<ffffffffa007db4d>] fscache_put_operation+0x135/0x2ed [fscache]
[<ffffffffa007ec07>] ? fscache_cancel_op+0x194/0x1cf [fscache]
[<ffffffffa008116d>] __fscache_read_or_alloc_pages+0x413/0x4bc [fscache]
[<ffffffff810ac8ae>] ? __alloc_pages_nodemask+0x195/0x75c
[<ffffffffa00aab0f>] __nfs_readpages_from_fscache+0x86/0x13d [nfs]
[<ffffffffa00a5fe0>] nfs_readpages+0x186/0x1bd [nfs]
[<ffffffff810d23c8>] ? alloc_pages_current+0xc7/0xe4
[<ffffffff810a68b5>] ? __page_cache_alloc+0x84/0x91
[<ffffffff810af912>] ? __do_page_cache_readahead+0xa6/0x2e0
[<ffffffff810afaa3>] __do_page_cache_readahead+0x237/0x2e0
[<ffffffff810af912>] ? __do_page_cache_readahead+0xa6/0x2e0
[<ffffffff810afe3e>] ra_submit+0x1c/0x20
[<ffffffff810b019b>] ondemand_readahead+0x359/0x382
[<ffffffff810b0279>] page_cache_sync_readahead+0x38/0x3a
[<ffffffff810a77b5>] generic_file_aio_read+0x26b/0x637
[<ffffffffa00f1852>] ? nfs_mark_delegation_referenced+0xb/0xb [nfsv4]
[<ffffffffa009cc85>] nfs_file_read+0xaa/0xcf [nfs]
[<ffffffff810db5b3>] do_sync_read+0x91/0xd1
[<ffffffff810dbb8b>] vfs_read+0x9b/0x144
[<ffffffff810dbc78>] sys_read+0x44/0x75
[<ffffffff81422892>] system_call_fastpath+0x16/0x1b
Signed-off-by: David Howells <dhowells@redhat.com>
2012-12-20 22:35:15 +00:00
..
2012-10-12 09:59:23 +09:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-12-17 15:44:47 -08:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-12-18 09:42:05 -08:00
2012-12-20 22:34:00 +00:00
2012-12-18 15:02:11 -08:00
2012-12-17 17:15:12 -08:00
2012-10-02 21:35:55 -04:00
2012-12-17 17:15:12 -08:00
2012-09-21 03:13:08 -07:00
2012-11-15 17:46:42 -08:00
2012-10-22 16:50:13 -07:00
2012-11-16 11:20:42 -06:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-12-14 12:17:32 +02:00
2012-12-17 17:15:27 -08:00
2012-10-09 23:23:53 +02:00
2012-12-17 17:15:12 -08:00
2012-12-17 17:15:12 -08:00
2012-12-17 17:15:22 -08:00
2012-10-02 20:25:04 -07:00
2012-12-20 22:35:15 +00:00
2012-12-17 20:58:12 -08:00
2012-12-17 17:15:12 -08:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-10-10 11:15:20 +09:00
2012-10-09 23:33:38 -04:00
2012-11-19 05:59:09 -08:00
2012-12-13 12:00:02 -08:00
2012-10-09 23:33:55 -04:00
2012-12-13 12:00:02 -08:00
2012-12-16 17:33:01 -08:00
2012-11-18 11:59:01 +02:00
2012-10-17 09:18:38 -05:00
2012-11-04 14:43:40 -05:00
2012-11-19 14:31:35 +01:00
2012-10-02 20:25:04 -07:00
2012-12-06 10:39:54 +01:00
2012-12-20 22:19:42 +00:00
2012-10-09 18:35:22 -04:00
2012-12-11 17:22:26 -08:00
2012-06-01 19:51:22 -07:00
2012-12-17 17:15:28 -08:00
2012-10-02 20:25:04 -07:00
2012-12-17 17:15:12 -08:00
2012-10-06 03:05:31 +09:00
2012-10-02 21:35:55 -04:00
2012-12-17 20:58:12 -08:00
2012-12-17 17:15:12 -08:00
2012-10-02 20:25:04 -07:00
2012-10-02 20:25:04 -07:00
2012-12-13 16:33:24 +01:00
2012-07-14 16:34:47 +04:00
2012-11-19 21:34:33 +01:00
2012-10-02 21:35:55 -04:00
2012-10-02 20:25:04 -07:00
2012-12-17 15:44:47 -08:00
2012-10-09 23:33:39 -04:00
2012-12-17 17:15:26 -08:00
2012-12-13 16:33:23 +01:00
2012-10-09 23:33:39 -04:00
2012-12-03 12:10:59 -06:00
2012-07-22 23:57:59 +04:00
2012-11-20 04:17:24 -08:00
2012-12-17 17:15:12 -08:00
2012-11-28 21:53:38 -05:00
2012-11-28 21:53:38 -05:00
2012-12-17 17:15:19 -08:00
2012-12-17 17:15:23 -08:00
2012-11-28 21:53:38 -05:00
2012-12-17 17:15:23 -08:00
2012-12-17 17:15:23 -08:00
2012-11-28 21:53:38 -05:00
2012-09-09 10:35:38 +02:00
2012-10-22 22:00:26 +02:00
2012-12-17 17:15:12 -08:00
2012-12-12 17:38:35 -08:00
2012-10-22 08:50:37 +03:00
2012-10-06 03:05:17 +09:00
2012-10-29 09:00:57 -07:00
2012-10-12 20:14:55 -04:00
2012-11-29 00:01:25 -05:00
2012-10-06 03:05:15 +09:00
2012-10-02 20:25:04 -07:00
2012-11-29 12:38:44 -08:00
2012-12-17 17:15:27 -08:00
2012-12-17 17:15:27 -08:00
2012-12-17 20:58:12 -08:00
2012-10-09 15:52:31 +09:00
2012-11-19 14:31:35 +01:00
2012-07-16 08:33:14 -07:00
2012-10-10 01:15:44 -04:00
2012-12-12 12:22:13 -08:00
2012-10-12 20:14:55 -04:00
2012-11-28 21:49:02 -05:00
2012-12-12 17:38:34 -08:00
2012-09-18 01:01:35 -07:00
2012-12-11 17:22:26 -08:00
2012-11-26 17:41:24 -08:00
2012-09-26 22:20:08 -04:00
2012-05-30 08:52:42 -07:00
2012-12-10 16:30:43 -05:00
2012-10-06 03:05:15 +09:00
2012-12-17 17:15:12 -08:00
2012-10-09 18:35:22 -04:00
2012-10-06 03:05:15 +09:00
2012-11-20 04:19:49 -08:00
2012-11-29 22:17:21 -05:00
2012-12-14 16:12:03 -08:00
2012-12-20 22:05:41 +00:00
2012-09-26 21:08:52 -04:00
2012-07-14 16:37:27 +04:00
2012-11-19 05:59:20 -08:00
2012-09-18 01:01:35 -07:00
2012-07-14 16:32:48 +04:00
2012-12-17 17:15:12 -08:00
2012-10-02 21:35:55 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-12-17 17:15:12 -08:00
2012-12-17 17:15:27 -08:00
2012-12-11 17:22:21 -08:00
2012-10-02 20:25:04 -07:00
2012-09-26 22:20:08 -04:00
2012-10-09 23:33:39 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-09-26 22:20:08 -04:00
2012-10-12 13:16:48 -07:00
2012-10-18 12:35:58 -07:00