Messages in this thread Patch in this message | | | From | "Eric W. Biederman" <> | Date | Mon, 4 Apr 2016 20:29:18 -0500 | Subject | [PATCH 02/13] devpts: More obvious check for the system devpts in pty allocation |
| |
This makes the logic of the test clearer, and removes a confusing use of opts.newinstance, which allows later changes not to worry if newinstance is set on the primary mount of devpts or not.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com> --- fs/devpts/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/devpts/inode.c b/fs/devpts/inode.c index c14d51795577..9f22c959d1f7 100644 --- a/fs/devpts/inode.c +++ b/fs/devpts/inode.c @@ -622,7 +622,7 @@ retry: mutex_lock(&allocated_ptys_lock); if (pty_count >= pty_limit - - (fsi->mount_opts.newinstance ? pty_reserve : 0)) { + ((devpts_mnt->mnt_sb == sb) ? pty_reserve : 0)) { mutex_unlock(&allocated_ptys_lock); return -ENOSPC; } -- 2.6.3
| |