[Devel] [PATCH RHEL7 COMMIT] fuse: fuse_blocked_for_wb must check rw_files

Konstantin Khorenko khorenko at virtuozzo.com
Tue Dec 20 02:48:24 PST 2016


Please consider to release a ReadyKernel live patch for it.

--
Best regards,

Konstantin Khorenko,
Virtuozzo Linux Kernel Team

On 12/20/2016 01:43 PM, Konstantin Khorenko wrote:
> The commit is pushed to "branch-rh7-3.10.0-327.36.1.vz7.20.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
> after rh7-3.10.0-327.36.1.vz7.20.17
> ------>
> commit 21f3ad7ee59642b5bfbb0404d4fcd5752a3209e6
> Author: Maxim Patlasov <mpatlasov at virtuozzo.com>
> Date:   Tue Dec 20 14:43:22 2016 +0400
>
>     fuse: fuse_blocked_for_wb must check rw_files
>
>     The patch fixes a silly mistake leading to a deadlock in
>     fuse_invalidate_files: so far as fuse_invalidate_files sets
>     FUSE_S_FAIL_IMMEDIATELY in all files of fi->rw_files list,
>     fuse_blocked_for_wb must check the bit in *this* list
>     (not in fi->write_files as it used to be).
>
>     https://jira.sw.ru/browse/PSBM-57460
>
>     Signed-off-by: Maxim Patlasov <mpatlasov at virtuozzo.com>
> ---
>  fs/fuse/file.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/fuse/file.c b/fs/fuse/file.c
> index 1bda994..540c18b 100644
> --- a/fs/fuse/file.c
> +++ b/fs/fuse/file.c
> @@ -2153,9 +2153,9 @@ static inline bool fuse_blocked_for_wb(struct inode *inode)
>  		return false;
>
>  	spin_lock(&fc->lock);
> -	if (!list_empty(&fi->write_files)) {
> -		struct fuse_file *ff = list_entry(fi->write_files.next,
> -						  struct fuse_file, write_entry);
> +	if (!list_empty(&fi->rw_files)) {
> +		struct fuse_file *ff = list_entry(fi->rw_files.next,
> +						  struct fuse_file, rw_entry);
>  		if (test_bit(FUSE_S_FAIL_IMMEDIATELY, &ff->ff_state))
>  			blocked = false;
>  	}
> .
>


More information about the Devel mailing list