locks: move freeing of leases outside of i_lock

There was only one place where we still could free a file_lock while
holding the i_lock -- lease_modify. Add a new list_head argument to the
lm_change operation, pass in a private list when calling it, and fix
those callers to dispose of the list once the lock has been dropped.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:
Jeff Layton
2014-09-01 07:12:07 -04:00
parent f82b4b6780
commit c45198eda2
4 changed files with 30 additions and 20 deletions

View File

@@ -469,8 +469,7 @@ prototypes:
};
locking rules:
All may block except for ->setlease.
No VFS locks held on entry except for ->setlease.
All may block.
->llseek() locking has moved from llseek to the individual llseek
implementations. If your fs is not using generic_file_llseek, you