nfsd: Prevent truncation of an unlinked inode from blocking access to its directory
authorYu Hsiang Huang <nickhuang@synology.com>
Fri, 14 May 2021 03:58:29 +0000 (11:58 +0800)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 25 May 2021 21:06:51 +0000 (17:06 -0400)
commite5d74a2d0ee67ae00edad43c3d7811016e4d2e21
tree5f236db5fe80be9f58925024e52bbd6853fbf88b
parentd6cbe98ff32aef795462a309ef048cfb89d1a11d
nfsd: Prevent truncation of an unlinked inode from blocking access to its directory

Truncation of an unlinked inode may take a long time for I/O waiting, and
it doesn't have to prevent access to the directory. Thus, let truncation
occur outside the directory's mutex, just like do_unlinkat() does.

Signed-off-by: Yu Hsiang Huang <nickhuang@synology.com>
Signed-off-by: Bing Jing Chang <bingjingc@synology.com>
Signed-off-by: Robbie Ko <robbieko@synology.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/vfs.c