lkml.org 
[lkml]   [2016]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Date
    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
    \
     
     \ /
      Last update: 2016-04-05 04:21    [W:4.728 / U:0.020 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site