Skip to content

Commit b583043

Browse files
author
Al Viro
committed
kill f_dentry uses
Signed-off-by: Al Viro <[email protected]>
1 parent 30e46ab commit b583043

File tree

19 files changed

+31
-37
lines changed

19 files changed

+31
-37
lines changed

drivers/block/drbd/drbd_debugfs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int in_flight_summary_show(struct seq_file *m, void *pos)
419419
return 0;
420420
}
421421

422-
/* simple_positive(file->f_dentry) respectively debugfs_positive(),
422+
/* simple_positive(file->f_path.dentry) respectively debugfs_positive(),
423423
* but neither is "reachable" from here.
424424
* So we have our own inline version of it above. :-( */
425425
static inline int debugfs_positive(struct dentry *dentry)
@@ -437,14 +437,14 @@ static int drbd_single_open(struct file *file, int (*show)(struct seq_file *, vo
437437

438438
/* Are we still linked,
439439
* or has debugfs_remove() already been called? */
440-
parent = file->f_dentry->d_parent;
440+
parent = file->f_path.dentry->d_parent;
441441
/* not sure if this can happen: */
442442
if (!parent || !parent->d_inode)
443443
goto out;
444444
/* serialize with d_delete() */
445445
mutex_lock(&parent->d_inode->i_mutex);
446446
/* Make sure the object is still alive */
447-
if (debugfs_positive(file->f_dentry)
447+
if (debugfs_positive(file->f_path.dentry)
448448
&& kref_get_unless_zero(kref))
449449
ret = 0;
450450
mutex_unlock(&parent->d_inode->i_mutex);

drivers/scsi/lpfc/lpfc_debugfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ static ssize_t
10111011
lpfc_debugfs_dif_err_read(struct file *file, char __user *buf,
10121012
size_t nbytes, loff_t *ppos)
10131013
{
1014-
struct dentry *dent = file->f_dentry;
1014+
struct dentry *dent = file->f_path.dentry;
10151015
struct lpfc_hba *phba = file->private_data;
10161016
char cbuf[32];
10171017
uint64_t tmp = 0;
@@ -1052,7 +1052,7 @@ static ssize_t
10521052
lpfc_debugfs_dif_err_write(struct file *file, const char __user *buf,
10531053
size_t nbytes, loff_t *ppos)
10541054
{
1055-
struct dentry *dent = file->f_dentry;
1055+
struct dentry *dent = file->f_path.dentry;
10561056
struct lpfc_hba *phba = file->private_data;
10571057
char dstbuf[32];
10581058
uint64_t tmp = 0;

drivers/staging/lustre/lustre/llite/file.c

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2092,15 +2092,15 @@ static int ll_swap_layouts(struct file *file1, struct file *file2,
20922092
rc = 0;
20932093
if (llss->ia2.ia_valid != 0) {
20942094
mutex_lock(&llss->inode1->i_mutex);
2095-
rc = ll_setattr(file1->f_dentry, &llss->ia2);
2095+
rc = ll_setattr(file1->f_path.dentry, &llss->ia2);
20962096
mutex_unlock(&llss->inode1->i_mutex);
20972097
}
20982098

20992099
if (llss->ia1.ia_valid != 0) {
21002100
int rc1;
21012101

21022102
mutex_lock(&llss->inode2->i_mutex);
2103-
rc1 = ll_setattr(file2->f_dentry, &llss->ia1);
2103+
rc1 = ll_setattr(file2->f_path.dentry, &llss->ia1);
21042104
mutex_unlock(&llss->inode2->i_mutex);
21052105
if (rc == 0)
21062106
rc = rc1;
@@ -2185,7 +2185,7 @@ static int ll_hsm_import(struct inode *inode, struct file *file,
21852185

21862186
mutex_lock(&inode->i_mutex);
21872187

2188-
rc = ll_setattr_raw(file->f_dentry, attr, true);
2188+
rc = ll_setattr_raw(file->f_path.dentry, attr, true);
21892189
if (rc == -ENODATA)
21902190
rc = 0;
21912191

@@ -2622,12 +2622,6 @@ int cl_sync_file_range(struct inode *inode, loff_t start, loff_t end,
26222622
return result;
26232623
}
26242624

2625-
/*
2626-
* When dentry is provided (the 'else' case), *file->f_dentry may be
2627-
* null and dentry must be used directly rather than pulled from
2628-
* *file->f_dentry as is done otherwise.
2629-
*/
2630-
26312625
int ll_fsync(struct file *file, loff_t start, loff_t end, int datasync)
26322626
{
26332627
struct dentry *dentry = file->f_dentry;

fs/ceph/dir.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ static int __dcache_readdir(struct file *file, struct dir_context *ctx,
123123
u32 shared_gen)
124124
{
125125
struct ceph_file_info *fi = file->private_data;
126-
struct dentry *parent = file->f_dentry;
126+
struct dentry *parent = file->f_path.dentry;
127127
struct inode *dir = parent->d_inode;
128128
struct list_head *p;
129129
struct dentry *dentry, *last;
@@ -274,7 +274,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
274274
off = 1;
275275
}
276276
if (ctx->pos == 1) {
277-
ino_t ino = parent_ino(file->f_dentry);
277+
ino_t ino = parent_ino(file->f_path.dentry);
278278
dout("readdir off 1 -> '..'\n");
279279
if (!dir_emit(ctx, "..", 2,
280280
ceph_translate_ino(inode->i_sb, ino),
@@ -337,7 +337,7 @@ static int ceph_readdir(struct file *file, struct dir_context *ctx)
337337
}
338338
req->r_inode = inode;
339339
ihold(inode);
340-
req->r_dentry = dget(file->f_dentry);
340+
req->r_dentry = dget(file->f_path.dentry);
341341
/* hints to request -> mds selection code */
342342
req->r_direct_mode = USE_AUTH_MDS;
343343
req->r_direct_hash = ceph_frag_value(frag);

fs/ceph/file.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ int ceph_open(struct inode *inode, struct file *file)
211211

212212
req->r_num_caps = 1;
213213
if (flags & O_CREAT)
214-
parent_inode = ceph_get_dentry_parent_inode(file->f_dentry);
214+
parent_inode = ceph_get_dentry_parent_inode(file->f_path.dentry);
215215
err = ceph_mdsc_do_request(mdsc, parent_inode, req);
216216
iput(parent_inode);
217217
if (!err)

fs/cifs/readdir.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,7 @@ static int cifs_filldir(char *find_entry, struct file *file,
753753
*/
754754
fattr.cf_flags |= CIFS_FATTR_NEED_REVAL;
755755

756-
cifs_prime_dcache(file->f_dentry, &name, &fattr);
756+
cifs_prime_dcache(file->f_path.dentry, &name, &fattr);
757757

758758
ino = cifs_uniqueid_to_ino_t(fattr.cf_uniqueid);
759759
return !dir_emit(ctx, name.name, name.len, ino, fattr.cf_dtype);

fs/ecryptfs/crypto.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1373,7 +1373,7 @@ static int ecryptfs_read_headers_virt(char *page_virt,
13731373
int ecryptfs_read_xattr_region(char *page_virt, struct inode *ecryptfs_inode)
13741374
{
13751375
struct dentry *lower_dentry =
1376-
ecryptfs_inode_to_private(ecryptfs_inode)->lower_file->f_dentry;
1376+
ecryptfs_inode_to_private(ecryptfs_inode)->lower_file->f_path.dentry;
13771377
ssize_t size;
13781378
int rc = 0;
13791379

fs/ecryptfs/mmap.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ static int ecryptfs_write_inode_size_to_xattr(struct inode *ecryptfs_inode)
419419
ssize_t size;
420420
void *xattr_virt;
421421
struct dentry *lower_dentry =
422-
ecryptfs_inode_to_private(ecryptfs_inode)->lower_file->f_dentry;
422+
ecryptfs_inode_to_private(ecryptfs_inode)->lower_file->f_path.dentry;
423423
struct inode *lower_inode = lower_dentry->d_inode;
424424
int rc;
425425

fs/efivarfs/file.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ static ssize_t efivarfs_file_write(struct file *file,
4747

4848
if (bytes == -ENOENT) {
4949
drop_nlink(inode);
50-
d_delete(file->f_dentry);
51-
dput(file->f_dentry);
50+
d_delete(file->f_path.dentry);
51+
dput(file->f_path.dentry);
5252
} else {
5353
mutex_lock(&inode->i_mutex);
5454
i_size_write(inode, datasize + sizeof(attributes));

fs/sync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ SYSCALL_DEFINE1(syncfs, int, fd)
154154

155155
if (!f.file)
156156
return -EBADF;
157-
sb = f.file->f_dentry->d_sb;
157+
sb = f.file->f_path.dentry->d_sb;
158158

159159
down_read(&sb->s_umount);
160160
ret = sync_filesystem(sb);

0 commit comments

Comments
 (0)