@@ -1378,12 +1378,14 @@ static int gfs2_dir_read_leaf(struct inode *inode, u64 *offset, void *opaque,
13781378 return error ;
13791379}
13801380
1381- /* gfs2_dir_readahead - Issue read-ahead requests for leaf blocks.
1381+ /**
1382+ * gfs2_dir_readahead - Issue read-ahead requests for leaf blocks.
13821383 *
13831384 * Note: we can't calculate each index like dir_e_read can because we don't
13841385 * have the leaf, and therefore we don't have the depth, and therefore we
13851386 * don't have the length. So we have to just read enough ahead to make up
1386- * for the loss of information. */
1387+ * for the loss of information.
1388+ */
13871389static void gfs2_dir_readahead (struct inode * inode , unsigned hsize , u32 index ,
13881390 struct file_ra_state * f_ra )
13891391{
@@ -1394,7 +1396,7 @@ static void gfs2_dir_readahead(struct inode *inode, unsigned hsize, u32 index,
13941396 unsigned count ;
13951397
13961398 /* First check if we've already read-ahead for the whole range. */
1397- if (! f_ra || index + MAX_RA_BLOCKS < f_ra -> start )
1399+ if (index + MAX_RA_BLOCKS < f_ra -> start )
13981400 return ;
13991401
14001402 f_ra -> start = max ((pgoff_t )index , f_ra -> start );
@@ -1448,7 +1450,7 @@ static int dir_e_read(struct inode *inode, u64 *offset, void *opaque,
14481450 hash = gfs2_dir_offset2hash (* offset );
14491451 index = hash >> (32 - dip -> i_depth );
14501452
1451- if (f_ra && dip -> i_hash_cache == NULL )
1453+ if (dip -> i_hash_cache == NULL )
14521454 f_ra -> start = 0 ;
14531455 lp = gfs2_dir_get_hash_table (dip );
14541456 if (IS_ERR (lp ))
0 commit comments