GFS2: f_ra is always valid in dir readahead function
>From 79c4c379c8f16a12c28ea2084db5138e33d17ebd Mon Sep 17 00:00:00 2001
From: Steven Whitehouse <swhiteho@redhat.com>
Date: Wed, 9 Nov 2011 13:46:06 +0000
Subject: [PATCH 2/2] GFS2: f_ra is always valid in dir readahead function
As a result, we don't need to test it each time.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Cc: Bob Peterson <rpeterso@redhat.com>
---
fs/gfs2/dir.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
-/* gfs2_dir_readahead - Issue read-ahead requests for leaf blocks.
+/**
+ * gfs2_dir_readahead - Issue read-ahead requests for leaf blocks.
*
* Note: we can't calculate each index like dir_e_read can because we don't
* have the leaf, and therefore we don't have the depth, and therefore we
* don't have the length. So we have to just read enough ahead to make up
- * for the loss of information. */
+ * for the loss of information.
+ */
static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index,
struct file_ra_state *f_ra)
{
@@ -1394,7 +1396,7 @@ static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index,
unsigned count;
/* First check if we've already read-ahead for the whole range. */
- if (!f_ra || index + MAX_RA_BLOCKS < f_ra->start)
+ if (index + MAX_RA_BLOCKS < f_ra->start)
return;