aboutsummaryrefslogtreecommitdiffstats
path: root/fs/libfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/libfs.c')
-rw-r--r--fs/libfs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/libfs.c b/fs/libfs.c
index bd08e0e64a8c..503898d5c4a7 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -63,7 +63,7 @@ int dcache_dir_open(struct inode *inode, struct file *file)
63{ 63{
64 static struct qstr cursor_name = {.len = 1, .name = "."}; 64 static struct qstr cursor_name = {.len = 1, .name = "."};
65 65
66 file->private_data = d_alloc(file->f_dentry, &cursor_name); 66 file->private_data = d_alloc(file->f_path.dentry, &cursor_name);
67 67
68 return file->private_data ? 0 : -ENOMEM; 68 return file->private_data ? 0 : -ENOMEM;
69} 69}
@@ -76,7 +76,7 @@ int dcache_dir_close(struct inode *inode, struct file *file)
76 76
77loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin) 77loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
78{ 78{
79 mutex_lock(&file->f_dentry->d_inode->i_mutex); 79 mutex_lock(&file->f_path.dentry->d_inode->i_mutex);
80 switch (origin) { 80 switch (origin) {
81 case 1: 81 case 1:
82 offset += file->f_pos; 82 offset += file->f_pos;
@@ -84,7 +84,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
84 if (offset >= 0) 84 if (offset >= 0)
85 break; 85 break;
86 default: 86 default:
87 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 87 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
88 return -EINVAL; 88 return -EINVAL;
89 } 89 }
90 if (offset != file->f_pos) { 90 if (offset != file->f_pos) {
@@ -96,8 +96,8 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
96 96
97 spin_lock(&dcache_lock); 97 spin_lock(&dcache_lock);
98 list_del(&cursor->d_u.d_child); 98 list_del(&cursor->d_u.d_child);
99 p = file->f_dentry->d_subdirs.next; 99 p = file->f_path.dentry->d_subdirs.next;
100 while (n && p != &file->f_dentry->d_subdirs) { 100 while (n && p != &file->f_path.dentry->d_subdirs) {
101 struct dentry *next; 101 struct dentry *next;
102 next = list_entry(p, struct dentry, d_u.d_child); 102 next = list_entry(p, struct dentry, d_u.d_child);
103 if (!d_unhashed(next) && next->d_inode) 103 if (!d_unhashed(next) && next->d_inode)
@@ -108,7 +108,7 @@ loff_t dcache_dir_lseek(struct file *file, loff_t offset, int origin)
108 spin_unlock(&dcache_lock); 108 spin_unlock(&dcache_lock);
109 } 109 }
110 } 110 }
111 mutex_unlock(&file->f_dentry->d_inode->i_mutex); 111 mutex_unlock(&file->f_path.dentry->d_inode->i_mutex);
112 return offset; 112 return offset;
113} 113}
114 114
@@ -126,7 +126,7 @@ static inline unsigned char dt_type(struct inode *inode)
126 126
127int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir) 127int dcache_readdir(struct file * filp, void * dirent, filldir_t filldir)
128{ 128{
129 struct dentry *dentry = filp->f_dentry; 129 struct dentry *dentry = filp->f_path.dentry;
130 struct dentry *cursor = filp->private_data; 130 struct dentry *cursor = filp->private_data;
131 struct list_head *p, *q = &cursor->d_u.d_child; 131 struct list_head *p, *q = &cursor->d_u.d_child;
132 ino_t ino; 132 ino_t ino;