Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4e136cd authored by Jeff Layton's avatar Jeff Layton
Browse files

locks: only remove leases associated with the file being closed



We don't want to remove all leases just because one filp was closed.

Signed-off-by: default avatarJeff Layton <jeff.layton@primarydata.com>
parent e084c1bd
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -2435,6 +2435,7 @@ locks_remove_lease(struct file *filp)

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