lkml.org 
[lkml]   [2015]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4/4] locks: only remove leases associated with the file being closed
    Date
    We don't want to remove all leases just because one filp was closed.

    Signed-off-by: Jeff Layton <jeff.layton@primarydata.com>
    ---
    fs/locks.c | 3 ++-
    1 file changed, 2 insertions(+), 1 deletion(-)

    diff --git a/fs/locks.c b/fs/locks.c
    index 59eadd416b8c..c748176fde6a 100644
    --- a/fs/locks.c
    +++ b/fs/locks.c
    @@ -2437,7 +2437,8 @@ locks_remove_lease(struct file *filp)

    spin_lock(&ctx->flc_lock);
    list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list)
    - lease_modify(fl, F_UNLCK, &dispose);
    + if (filp == fl->fl_file)
    + lease_modify(fl, F_UNLCK, &dispose);
    spin_unlock(&ctx->flc_lock);
    locks_dispose_list(&dispose);
    }
    --
    2.1.0


    \
     
     \ /
      Last update: 2015-02-17 14:01    [W:2.712 / U:0.012 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site