Project

General

Profile

Bug #11188 ยป 0001-locks-fix-file_lock-deletion-inside-loop.patch

Zheng Yan, 03/27/2015 02:37 AM

View differences:

fs/locks.c
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);
......
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) {
    (1-1/1)