[PATCH 2/3] devpts: use follow_up_bind() helper

From: Christian Brauner
Date: Thu Apr 05 2018 - 06:46:17 EST


Signed-off-by: Christian Brauner <christian.brauner@xxxxxxxxxx>
---
fs/devpts/inode.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index e072e955ce33..5e516846074e 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -181,9 +181,7 @@ struct vfsmount *devpts_mntget(struct file *filp, struct pts_fs_info *fsi)
/* Walk upward while the start point is a bind mount of
* a single file.
*/
- while (path.mnt->mnt_root == path.dentry)
- if (follow_up(&path) == 0)
- break;
+ follow_up_bind(&path);

/* devpts_ptmx_path() finds a devpts fs or returns an error. */
if ((path.mnt->mnt_sb->s_magic != DEVPTS_SUPER_MAGIC) ||
--
2.15.1