aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/dir.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/dir.c')
-rw-r--r--fs/ocfs2/dir.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/ocfs2/dir.c b/fs/ocfs2/dir.c
index 8fe4e2892ab9..f1e1aed8f638 100644
--- a/fs/ocfs2/dir.c
+++ b/fs/ocfs2/dir.c
@@ -67,7 +67,6 @@
67#define NAMEI_RA_CHUNKS 2 67#define NAMEI_RA_CHUNKS 2
68#define NAMEI_RA_BLOCKS 4 68#define NAMEI_RA_BLOCKS 4
69#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) 69#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS)
70#define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b))
71 70
72static unsigned char ocfs2_filetype_table[] = { 71static unsigned char ocfs2_filetype_table[] = {
73 DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR, DT_BLK, DT_FIFO, DT_SOCK, DT_LNK 72 DT_UNKNOWN, DT_REG, DT_DIR, DT_CHR, DT_BLK, DT_FIFO, DT_SOCK, DT_LNK
@@ -2015,12 +2014,12 @@ int ocfs2_dir_foreach(struct inode *inode, loff_t *f_pos, void *priv,
2015int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) 2014int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)
2016{ 2015{
2017 int error = 0; 2016 int error = 0;
2018 struct inode *inode = filp->f_path.dentry->d_inode; 2017 struct inode *inode = file_inode(filp);
2019 int lock_level = 0; 2018 int lock_level = 0;
2020 2019
2021 trace_ocfs2_readdir((unsigned long long)OCFS2_I(inode)->ip_blkno); 2020 trace_ocfs2_readdir((unsigned long long)OCFS2_I(inode)->ip_blkno);
2022 2021
2023 error = ocfs2_inode_lock_atime(inode, filp->f_vfsmnt, &lock_level); 2022 error = ocfs2_inode_lock_atime(inode, filp->f_path.mnt, &lock_level);
2024 if (lock_level && error >= 0) { 2023 if (lock_level && error >= 0) {
2025 /* We release EX lock which used to update atime 2024 /* We release EX lock which used to update atime
2026 * and get PR lock again to reduce contention 2025 * and get PR lock again to reduce contention