NFSD: Protect against filesystem freezing
[ Upstream commitfd9a2e1d51
] Flole observes this WARNING on occasion: [1210423.486503] WARNING: CPU: 8 PID: 1524732 at fs/ext4/ext4_jbd2.c:75 ext4_journal_check_start+0x68/0xb0 Reported-by: <flole@flole.de> Suggested-by: Jan Kara <jack@suse.cz> Link: https://bugzilla.kernel.org/show_bug.cgi?id=217123 Fixes:73da852e38
("nfsd: use vfs_iter_read/write") Reviewed-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
This commit is contained in:
Родитель
17298e0800
Коммит
8e469b9944
|
@ -1101,7 +1101,9 @@ nfsd_vfs_write(struct svc_rqst *rqstp, struct svc_fh *fhp, struct nfsd_file *nf,
|
|||
since = READ_ONCE(file->f_wb_err);
|
||||
if (verf)
|
||||
nfsd_copy_write_verifier(verf, nn);
|
||||
file_start_write(file);
|
||||
host_err = vfs_iter_write(file, &iter, &pos, flags);
|
||||
file_end_write(file);
|
||||
if (host_err < 0) {
|
||||
nfsd_reset_write_verifier(nn);
|
||||
trace_nfsd_writeverf_reset(nn, rqstp, host_err);
|
||||
|
|
Загрузка…
Ссылка в новой задаче