Skip to content
Commit e1616300 authored by Kazuya Mio's avatar Kazuya Mio Committed by Al Viro
Browse files

wake up s_wait_unfrozen when ->freeze_fs fails



dd slept infinitely when fsfeeze failed because of EIO.
To fix this problem, if ->freeze_fs fails, freeze_super() wakes up
the tasks waiting for the filesystem to become unfrozen.

When s_frozen isn't SB_UNFROZEN in __generic_file_aio_write(),
the function sleeps until FITHAW ioctl wakes up s_wait_unfrozen.

However, if ->freeze_fs fails, s_frozen is set to SB_UNFROZEN and then
freeze_super() returns an error number. In this case, FITHAW ioctl returns
EINVAL because s_frozen is already SB_UNFROZEN. There is no way to wake up
s_wait_unfrozen, so __generic_file_aio_write() sleeps infinitely.

Signed-off-by: default avatarKazuya Mio <k-mio@sx.jp.nec.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c2bc3a31
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment