Skip to content

Commit f55ac56

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs fixes (try two) from Al Viro: "nfsd performance regression fix + seq_file lseek(2) fix" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: seq_file: always update file->f_pos in seq_lseek() nfsd regression since delayed fput()
2 parents 4208c47 + 05e1674 commit f55ac56

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fs/file_table.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ void flush_delayed_fput(void)
297297
delayed_fput(NULL);
298298
}
299299

300-
static DECLARE_WORK(delayed_fput_work, delayed_fput);
300+
static DECLARE_DELAYED_WORK(delayed_fput_work, delayed_fput);
301301

302302
void fput(struct file *file)
303303
{
@@ -317,7 +317,7 @@ void fput(struct file *file)
317317
}
318318

319319
if (llist_add(&file->f_u.fu_llist, &delayed_fput_list))
320-
schedule_work(&delayed_fput_work);
320+
schedule_delayed_work(&delayed_fput_work, 1);
321321
}
322322
}
323323

fs/seq_file.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ loff_t seq_lseek(struct file *file, loff_t offset, int whence)
328328
m->read_pos = offset;
329329
retval = file->f_pos = offset;
330330
}
331+
} else {
332+
file->f_pos = offset;
331333
}
332334
}
333335
file->f_version = m->version;

0 commit comments

Comments
 (0)