diff options
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index 8fd2a95860ba..d116ca8ce4c0 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -123,7 +123,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, | |||
123 | if (!inode) | 123 | if (!inode) |
124 | goto out; | 124 | goto out; |
125 | 125 | ||
126 | alias = d_materialise_unique(dentry, inode); | 126 | alias = d_splice_alias(inode, dentry); |
127 | if (alias && !IS_ERR(alias)) | 127 | if (alias && !IS_ERR(alias)) |
128 | dput(alias); | 128 | dput(alias); |
129 | out: | 129 | out: |
@@ -261,7 +261,7 @@ initiate_cifs_search(const unsigned int xid, struct file *file) | |||
261 | int rc = 0; | 261 | int rc = 0; |
262 | char *full_path = NULL; | 262 | char *full_path = NULL; |
263 | struct cifsFileInfo *cifsFile; | 263 | struct cifsFileInfo *cifsFile; |
264 | struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | 264 | struct cifs_sb_info *cifs_sb = CIFS_FILE_SB(file); |
265 | struct tcon_link *tlink = NULL; | 265 | struct tcon_link *tlink = NULL; |
266 | struct cifs_tcon *tcon; | 266 | struct cifs_tcon *tcon; |
267 | struct TCP_Server_Info *server; | 267 | struct TCP_Server_Info *server; |
@@ -561,7 +561,7 @@ find_cifs_entry(const unsigned int xid, struct cifs_tcon *tcon, loff_t pos, | |||
561 | loff_t first_entry_in_buffer; | 561 | loff_t first_entry_in_buffer; |
562 | loff_t index_to_find = pos; | 562 | loff_t index_to_find = pos; |
563 | struct cifsFileInfo *cfile = file->private_data; | 563 | struct cifsFileInfo *cfile = file->private_data; |
564 | struct cifs_sb_info *cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); | 564 | struct cifs_sb_info *cifs_sb = CIFS_FILE_SB(file); |
565 | struct TCP_Server_Info *server = tcon->ses->server; | 565 | struct TCP_Server_Info *server = tcon->ses->server; |
566 | /* check if index in the buffer */ | 566 | /* check if index in the buffer */ |
567 | 567 | ||
@@ -679,7 +679,7 @@ static int cifs_filldir(char *find_entry, struct file *file, | |||
679 | char *scratch_buf, unsigned int max_len) | 679 | char *scratch_buf, unsigned int max_len) |
680 | { | 680 | { |
681 | struct cifsFileInfo *file_info = file->private_data; | 681 | struct cifsFileInfo *file_info = file->private_data; |
682 | struct super_block *sb = file->f_path.dentry->d_sb; | 682 | struct super_block *sb = file_inode(file)->i_sb; |
683 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); | 683 | struct cifs_sb_info *cifs_sb = CIFS_SB(sb); |
684 | struct cifs_dirent de = { NULL, }; | 684 | struct cifs_dirent de = { NULL, }; |
685 | struct cifs_fattr fattr; | 685 | struct cifs_fattr fattr; |
@@ -753,7 +753,7 @@ static int cifs_filldir(char *find_entry, struct file *file, | |||
753 | */ | 753 | */ |
754 | fattr.cf_flags |= CIFS_FATTR_NEED_REVAL; | 754 | fattr.cf_flags |= CIFS_FATTR_NEED_REVAL; |
755 | 755 | ||
756 | cifs_prime_dcache(file->f_dentry, &name, &fattr); | 756 | cifs_prime_dcache(file->f_path.dentry, &name, &fattr); |
757 | 757 | ||
758 | ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid); | 758 | ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid); |
759 | return !dir_emit(ctx, name.name, name.len, ino, fattr.cf_dtype); | 759 | return !dir_emit(ctx, name.name, name.len, ino, fattr.cf_dtype); |