diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:43 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 09:44:43 -0400 |
commit | 4ab30319fd7c691a1b3165325c647a5cd6d282ac (patch) | |
tree | 07e6d643060b4a2156bab75f14c1a7ca221567c3 | |
parent | c6718543463dbb78486ad259f884cb800df802b5 (diff) |
Revert "vfs: add flags to d_real()"
This reverts commit 495e642939114478a5237a7d91661ba93b76f15a.
No user of "flags" argument of d_real() remain.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
-rw-r--r-- | Documentation/filesystems/Locking | 2 | ||||
-rw-r--r-- | Documentation/filesystems/vfs.txt | 2 | ||||
-rw-r--r-- | fs/open.c | 2 | ||||
-rw-r--r-- | fs/overlayfs/super.c | 4 | ||||
-rw-r--r-- | include/linux/dcache.h | 11 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
6 files changed, 11 insertions, 12 deletions
diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking index 2c391338c675..24e1a4f37c83 100644 --- a/Documentation/filesystems/Locking +++ b/Documentation/filesystems/Locking | |||
@@ -22,7 +22,7 @@ prototypes: | |||
22 | struct vfsmount *(*d_automount)(struct path *path); | 22 | struct vfsmount *(*d_automount)(struct path *path); |
23 | int (*d_manage)(const struct path *, bool); | 23 | int (*d_manage)(const struct path *, bool); |
24 | struct dentry *(*d_real)(struct dentry *, const struct inode *, | 24 | struct dentry *(*d_real)(struct dentry *, const struct inode *, |
25 | unsigned int, unsigned int); | 25 | unsigned int); |
26 | 26 | ||
27 | locking rules: | 27 | locking rules: |
28 | rename_lock ->d_lock may block rcu-walk | 28 | rename_lock ->d_lock may block rcu-walk |
diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 829a7b7857a4..6417b161f88d 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation/filesystems/vfs.txt | |||
@@ -1001,7 +1001,7 @@ struct dentry_operations { | |||
1001 | struct vfsmount *(*d_automount)(struct path *); | 1001 | struct vfsmount *(*d_automount)(struct path *); |
1002 | int (*d_manage)(const struct path *, bool); | 1002 | int (*d_manage)(const struct path *, bool); |
1003 | struct dentry *(*d_real)(struct dentry *, const struct inode *, | 1003 | struct dentry *(*d_real)(struct dentry *, const struct inode *, |
1004 | unsigned int, unsigned int); | 1004 | unsigned int); |
1005 | }; | 1005 | }; |
1006 | 1006 | ||
1007 | d_revalidate: called when the VFS needs to revalidate a dentry. This | 1007 | d_revalidate: called when the VFS needs to revalidate a dentry. This |
@@ -96,7 +96,7 @@ long vfs_truncate(const struct path *path, loff_t length) | |||
96 | * write access on the upper inode, not on the overlay inode. For | 96 | * write access on the upper inode, not on the overlay inode. For |
97 | * non-overlay filesystems d_real() is an identity function. | 97 | * non-overlay filesystems d_real() is an identity function. |
98 | */ | 98 | */ |
99 | upperdentry = d_real(path->dentry, NULL, O_WRONLY, 0); | 99 | upperdentry = d_real(path->dentry, NULL, O_WRONLY); |
100 | error = PTR_ERR(upperdentry); | 100 | error = PTR_ERR(upperdentry); |
101 | if (IS_ERR(upperdentry)) | 101 | if (IS_ERR(upperdentry)) |
102 | goto mnt_drop_write_and_out; | 102 | goto mnt_drop_write_and_out; |
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index a7e2287e4b8f..5bc261de5041 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c | |||
@@ -92,7 +92,7 @@ static int ovl_check_append_only(struct inode *inode, int flag) | |||
92 | 92 | ||
93 | static struct dentry *ovl_d_real(struct dentry *dentry, | 93 | static struct dentry *ovl_d_real(struct dentry *dentry, |
94 | const struct inode *inode, | 94 | const struct inode *inode, |
95 | unsigned int open_flags, unsigned int flags) | 95 | unsigned int open_flags) |
96 | { | 96 | { |
97 | struct dentry *real; | 97 | struct dentry *real; |
98 | int err; | 98 | int err; |
@@ -128,7 +128,7 @@ static struct dentry *ovl_d_real(struct dentry *dentry, | |||
128 | goto bug; | 128 | goto bug; |
129 | 129 | ||
130 | /* Handle recursion */ | 130 | /* Handle recursion */ |
131 | real = d_real(real, inode, open_flags, 0); | 131 | real = d_real(real, inode, open_flags); |
132 | 132 | ||
133 | if (!inode || inode == d_inode(real)) | 133 | if (!inode || inode == d_inode(real)) |
134 | return real; | 134 | return real; |
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index ddae4103d324..8fe4efa94af6 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -146,7 +146,7 @@ struct dentry_operations { | |||
146 | struct vfsmount *(*d_automount)(struct path *); | 146 | struct vfsmount *(*d_automount)(struct path *); |
147 | int (*d_manage)(const struct path *, bool); | 147 | int (*d_manage)(const struct path *, bool); |
148 | struct dentry *(*d_real)(struct dentry *, const struct inode *, | 148 | struct dentry *(*d_real)(struct dentry *, const struct inode *, |
149 | unsigned int, unsigned int); | 149 | unsigned int); |
150 | } ____cacheline_aligned; | 150 | } ____cacheline_aligned; |
151 | 151 | ||
152 | /* | 152 | /* |
@@ -568,8 +568,7 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) | |||
568 | * d_real - Return the real dentry | 568 | * d_real - Return the real dentry |
569 | * @dentry: the dentry to query | 569 | * @dentry: the dentry to query |
570 | * @inode: inode to select the dentry from multiple layers (can be NULL) | 570 | * @inode: inode to select the dentry from multiple layers (can be NULL) |
571 | * @open_flags: open flags to control copy-up behavior | 571 | * @flags: open flags to control copy-up behavior |
572 | * @flags: flags to control what is returned by this function | ||
573 | * | 572 | * |
574 | * If dentry is on a union/overlay, then return the underlying, real dentry. | 573 | * If dentry is on a union/overlay, then return the underlying, real dentry. |
575 | * Otherwise return the dentry itself. | 574 | * Otherwise return the dentry itself. |
@@ -578,10 +577,10 @@ static inline struct dentry *d_backing_dentry(struct dentry *upper) | |||
578 | */ | 577 | */ |
579 | static inline struct dentry *d_real(struct dentry *dentry, | 578 | static inline struct dentry *d_real(struct dentry *dentry, |
580 | const struct inode *inode, | 579 | const struct inode *inode, |
581 | unsigned int open_flags, unsigned int flags) | 580 | unsigned int flags) |
582 | { | 581 | { |
583 | if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) | 582 | if (unlikely(dentry->d_flags & DCACHE_OP_REAL)) |
584 | return dentry->d_op->d_real(dentry, inode, open_flags, flags); | 583 | return dentry->d_op->d_real(dentry, inode, flags); |
585 | else | 584 | else |
586 | return dentry; | 585 | return dentry; |
587 | } | 586 | } |
@@ -596,7 +595,7 @@ static inline struct dentry *d_real(struct dentry *dentry, | |||
596 | static inline struct inode *d_real_inode(const struct dentry *dentry) | 595 | static inline struct inode *d_real_inode(const struct dentry *dentry) |
597 | { | 596 | { |
598 | /* This usage of d_real() results in const dentry */ | 597 | /* This usage of d_real() results in const dentry */ |
599 | return d_backing_inode(d_real((struct dentry *) dentry, NULL, 0, 0)); | 598 | return d_backing_inode(d_real((struct dentry *) dentry, NULL, 0)); |
600 | } | 599 | } |
601 | 600 | ||
602 | struct name_snapshot { | 601 | struct name_snapshot { |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 8f8c9ac1c9d5..16e2741cec3c 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1249,7 +1249,7 @@ static inline struct inode *file_inode(const struct file *f) | |||
1249 | 1249 | ||
1250 | static inline struct dentry *file_dentry(const struct file *file) | 1250 | static inline struct dentry *file_dentry(const struct file *file) |
1251 | { | 1251 | { |
1252 | return d_real(file->f_path.dentry, file_inode(file), 0, 0); | 1252 | return d_real(file->f_path.dentry, file_inode(file), 0); |
1253 | } | 1253 | } |
1254 | 1254 | ||
1255 | static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl) | 1255 | static inline int locks_lock_file_wait(struct file *filp, struct file_lock *fl) |