]>
Commit | Line | Data |
---|---|---|
2cb7cef9 BS |
1 | From: Joel Becker <joel.becker@oracle.com> |
2 | Subject: ocfs2: Kill the last naked wait_on_buffer() for cached reads. | |
3 | Patch-mainline: 2.6.28 | |
4 | ||
5 | ocfs2's cached buffer I/O goes through ocfs2_read_block(s)(). dir.c had | |
6 | a naked wait_on_buffer() to wait for some readahead, but it should | |
7 | use ocfs2_read_block() instead. | |
8 | ||
9 | Signed-off-by: Joel Becker <joel.becker@oracle.com> | |
10 | Signed-off-by: Mark Fasheh <mfasheh@suse.com> | |
11 | --- | |
12 | fs/ocfs2/dir.c | 7 +++---- | |
13 | 1 files changed, 3 insertions(+), 4 deletions(-) | |
14 | ||
15 | Index: linux-2.6.27/fs/ocfs2/dir.c | |
16 | =================================================================== | |
17 | --- linux-2.6.27.orig/fs/ocfs2/dir.c | |
18 | +++ linux-2.6.27/fs/ocfs2/dir.c | |
19 | @@ -302,14 +302,13 @@ restart: | |
20 | } | |
21 | if ((bh = bh_use[ra_ptr++]) == NULL) | |
22 | goto next; | |
23 | - wait_on_buffer(bh); | |
24 | - if (!buffer_uptodate(bh)) { | |
25 | - /* read error, skip block & hope for the best */ | |
26 | + if (ocfs2_read_block(dir, block, &bh)) { | |
27 | + /* read error, skip block & hope for the best. | |
28 | + * ocfs2_read_block() has released the bh. */ | |
29 | ocfs2_error(dir->i_sb, "reading directory %llu, " | |
30 | "offset %lu\n", | |
31 | (unsigned long long)OCFS2_I(dir)->ip_blkno, | |
32 | block); | |
33 | - brelse(bh); | |
34 | goto next; | |
35 | } | |
36 | i = ocfs2_search_dirblock(bh, dir, name, namelen, |