/[linux-patches]/genpatches-2.6/tags/2.6.37-6/1900_fs-cache-op-handling-fix.patch
Gentoo

Contents of /genpatches-2.6/tags/2.6.37-6/1900_fs-cache-op-handling-fix.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1900 - (show annotations) (download)
Mon Mar 28 22:05:09 2011 UTC (7 years, 3 months ago) by mpagano
File size: 1201 byte(s)
2.6.37-6 release
1 From: Akshat Aranya <aranya@nec-labs.com>
2 Date: Fri, 14 Jan 2011 16:00:47 +0000 (+0000)
3 Subject: FS-Cache: Fix operation handling
4 X-Git-Tag: v2.6.38-rc1~59
5 X-Git-Url: http://git.kernel.org/?p=linux%2Fkernel%2Fgit%2Ftorvalds%2Flinux-2.6.git;a=commitdiff_plain;h=ba28b93a5227cc69ec811507f7d85ac25fa20fe2
6
7 FS-Cache: Fix operation handling
8
9 fscache_submit_exclusive_op() adds an operation to the pending list if
10 other operations are pending. Fix the check for pending ops as n_ops
11 must be greater than 0 at the point it is checked as it is incremented
12 immediately before under lock.
13
14 Signed-off-by: Akshat Aranya <aranya@nec-labs.com>
15 Signed-off-by: David Howells <dhowells@redhat.com>
16 Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 ---
18
19 --- a/fs/fscache/operation.c 2011-03-20 14:57:01.000000000 -0400
20 +++ b/fs/fscache/operation.c 2011-03-20 14:57:28.000000000 -0400
21 @@ -101,7 +101,7 @@ int fscache_submit_exclusive_op(struct f
22 object->n_ops++;
23 object->n_exclusive++; /* reads and writes must wait */
24
25 - if (object->n_ops > 0) {
26 + if (object->n_ops > 1) {
27 atomic_inc(&op->usage);
28 list_add_tail(&op->pend_link, &object->pending_ops);
29 fscache_stat(&fscache_n_op_pend);

  ViewVC Help
Powered by ViewVC 1.1.20