mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-02 09:51:21 -04:00
Merge tag 'locks-v4.0-5' of git://git.samba.org/jlayton/linux
Pull file locking fix from Jeff Layton: "Another small fix for the lease overhaul" * tag 'locks-v4.0-5' of git://git.samba.org/jlayton/linux: locks: fix file_lock deletion inside loop
This commit is contained in:
@@ -1388,9 +1388,8 @@ any_leases_conflict(struct inode *inode, struct file_lock *breaker)
|
||||
int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
|
||||
{
|
||||
int error = 0;
|
||||
struct file_lock *new_fl;
|
||||
struct file_lock_context *ctx = inode->i_flctx;
|
||||
struct file_lock *fl;
|
||||
struct file_lock *new_fl, *fl, *tmp;
|
||||
unsigned long break_time;
|
||||
int want_write = (mode & O_ACCMODE) != O_RDONLY;
|
||||
LIST_HEAD(dispose);
|
||||
@@ -1420,7 +1419,7 @@ int __break_lease(struct inode *inode, unsigned int mode, unsigned int type)
|
||||
break_time++; /* so that 0 means no break time */
|
||||
}
|
||||
|
||||
list_for_each_entry(fl, &ctx->flc_lease, fl_list) {
|
||||
list_for_each_entry_safe(fl, tmp, &ctx->flc_lease, fl_list) {
|
||||
if (!leases_conflict(fl, new_fl))
|
||||
continue;
|
||||
if (want_write) {
|
||||
|
||||
Reference in New Issue
Block a user