aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/devpts/inode.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c
index 108df2e3602c..44dfbca9306f 100644
--- a/fs/devpts/inode.c
+++ b/fs/devpts/inode.c
@@ -133,7 +133,7 @@ static inline struct pts_fs_info *DEVPTS_SB(struct super_block *sb)
133 return sb->s_fs_info; 133 return sb->s_fs_info;
134} 134}
135 135
136struct pts_fs_info *devpts_acquire(struct file *filp) 136struct pts_fs_info *devpts_acquire(struct file *filp, struct vfsmount **ptsmnt)
137{ 137{
138 struct pts_fs_info *result; 138 struct pts_fs_info *result;
139 struct path path; 139 struct path path;
@@ -142,6 +142,7 @@ struct pts_fs_info *devpts_acquire(struct file *filp)
142 142
143 path = filp->f_path; 143 path = filp->f_path;
144 path_get(&path); 144 path_get(&path);
145 *ptsmnt = NULL;
145 146
146 /* Has the devpts filesystem already been found? */ 147 /* Has the devpts filesystem already been found? */
147 sb = path.mnt->mnt_sb; 148 sb = path.mnt->mnt_sb;
@@ -165,6 +166,7 @@ struct pts_fs_info *devpts_acquire(struct file *filp)
165 * pty code needs to hold extra references in case of last /dev/tty close 166 * pty code needs to hold extra references in case of last /dev/tty close
166 */ 167 */
167 atomic_inc(&sb->s_active); 168 atomic_inc(&sb->s_active);
169 *ptsmnt = mntget(path.mnt);
168 result = DEVPTS_SB(sb); 170 result = DEVPTS_SB(sb);
169 171
170out: 172out: