Skip to content

Commit f473bf9

Browse files
committed
Revert "vfs: fix freeze protection in mnt_want_write_file() for overlayfs"
This reverts commit 4f4374a which was commit a6795a5 upstream. Turns out this causes problems and was to fix a patch only in the 4.19 and newer tree. Reported-by: Amir Goldstein <amir73il@gmail.com> Cc: Miklos Szeredi <mszeredi@redhat.com> Cc: Christoph Hellwig <hch@lst.de> Cc: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e261faa commit f473bf9

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

fs/namespace.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,10 +446,10 @@ int mnt_want_write_file_path(struct file *file)
446446
{
447447
int ret;
448448

449-
sb_start_write(file_inode(file)->i_sb);
449+
sb_start_write(file->f_path.mnt->mnt_sb);
450450
ret = __mnt_want_write_file(file);
451451
if (ret)
452-
sb_end_write(file_inode(file)->i_sb);
452+
sb_end_write(file->f_path.mnt->mnt_sb);
453453
return ret;
454454
}
455455

@@ -540,8 +540,7 @@ void __mnt_drop_write_file(struct file *file)
540540

541541
void mnt_drop_write_file_path(struct file *file)
542542
{
543-
__mnt_drop_write_file(file);
544-
sb_end_write(file_inode(file)->i_sb);
543+
mnt_drop_write(file->f_path.mnt);
545544
}
546545

547546
void mnt_drop_write_file(struct file *file)

0 commit comments

Comments
 (0)