remove SWRITE* I/O types
These flags aren't real I/O types, but tell ll_rw_block to always lock the buffer instead of giving up on a failed trylock. Instead add a new write_dirty_buffer helper that implements this semantic and use it from the existing SWRITE* callers. Note that the ll_rw_block code had a bug where it didn't promote WRITE_SYNC_PLUG properly, which this patch fixes. In the ufs code clean up the helper that used to call ll_rw_block to mirror sync_dirty_buffer, which is the function it implements for compound buffers. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:

committed by
Al Viro

parent
87e99511ea
commit
9cb569d601
@@ -113,10 +113,8 @@ void ufs_free_inode (struct inode * inode)
|
||||
|
||||
ubh_mark_buffer_dirty (USPI_UBH(uspi));
|
||||
ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
|
||||
if (sb->s_flags & MS_SYNCHRONOUS) {
|
||||
ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
|
||||
ubh_wait_on_buffer (UCPI_UBH(ucpi));
|
||||
}
|
||||
if (sb->s_flags & MS_SYNCHRONOUS)
|
||||
ubh_sync_block(UCPI_UBH(ucpi));
|
||||
|
||||
sb->s_dirt = 1;
|
||||
unlock_super (sb);
|
||||
@@ -156,10 +154,8 @@ static void ufs2_init_inodes_chunk(struct super_block *sb,
|
||||
|
||||
fs32_add(sb, &ucg->cg_u.cg_u2.cg_initediblk, uspi->s_inopb);
|
||||
ubh_mark_buffer_dirty(UCPI_UBH(ucpi));
|
||||
if (sb->s_flags & MS_SYNCHRONOUS) {
|
||||
ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
|
||||
ubh_wait_on_buffer(UCPI_UBH(ucpi));
|
||||
}
|
||||
if (sb->s_flags & MS_SYNCHRONOUS)
|
||||
ubh_sync_block(UCPI_UBH(ucpi));
|
||||
|
||||
UFSD("EXIT\n");
|
||||
}
|
||||
@@ -290,10 +286,8 @@ cg_found:
|
||||
}
|
||||
ubh_mark_buffer_dirty (USPI_UBH(uspi));
|
||||
ubh_mark_buffer_dirty (UCPI_UBH(ucpi));
|
||||
if (sb->s_flags & MS_SYNCHRONOUS) {
|
||||
ubh_ll_rw_block(SWRITE, UCPI_UBH(ucpi));
|
||||
ubh_wait_on_buffer (UCPI_UBH(ucpi));
|
||||
}
|
||||
if (sb->s_flags & MS_SYNCHRONOUS)
|
||||
ubh_sync_block(UCPI_UBH(ucpi));
|
||||
sb->s_dirt = 1;
|
||||
|
||||
inode->i_ino = cg * uspi->s_ipg + bit;
|
||||
|
Reference in New Issue
Block a user