Commit cb6478e5 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Linus Torvalds

[PATCH] block new writers on frozen filesystems

When the lockfs patches went in an important bit got lost, the call in
generic_file_write to put newly incoming writers to sleep when a filesystem
is frozen.  Nathan added back the call in the now separate XFS write patch,
and the patch for the generic code is below:
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent a5aa39e2
...@@ -2078,6 +2078,8 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov, ...@@ -2078,6 +2078,8 @@ __generic_file_aio_write_nolock(struct kiocb *iocb, const struct iovec *iov,
count = ocount; count = ocount;
pos = *ppos; pos = *ppos;
vfs_check_frozen(inode->i_sb, SB_FREEZE_WRITE);
/* We can write back this queue in page reclaim */ /* We can write back this queue in page reclaim */
current->backing_dev_info = mapping->backing_dev_info; current->backing_dev_info = mapping->backing_dev_info;
written = 0; written = 0;
......
Markdown is supported
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