nilfs2: get rid of nilfs_mdt_mark_block_dirty()
nilfs_mdt_mark_block_dirty() can be replaced with primary functions like nilfs_mdt_get_block() and mark_buffer_dirty(), and it's used only by nilfs_ioctl_mark_blocks_dirty(). This gets rid of the function to simplify the interface of metadata file. Link: http://lkml.kernel.org/r/1461935747-10380-8-git-send-email-konishi.ryusuke@lab.ntt.co.jp Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:

committed by
Linus Torvalds

parent
756cbdb353
commit
24e20ead2f
@@ -389,34 +389,6 @@ int nilfs_mdt_forget_block(struct inode *inode, unsigned long block)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
* nilfs_mdt_mark_block_dirty - mark a block on the meta data file dirty.
|
||||
* @inode: inode of the meta data file
|
||||
* @block: block offset
|
||||
*
|
||||
* Return Value: On success, it returns 0. On error, the following negative
|
||||
* error code is returned.
|
||||
*
|
||||
* %-ENOMEM - Insufficient memory available.
|
||||
*
|
||||
* %-EIO - I/O error
|
||||
*
|
||||
* %-ENOENT - the specified block does not exist (hole block)
|
||||
*/
|
||||
int nilfs_mdt_mark_block_dirty(struct inode *inode, unsigned long block)
|
||||
{
|
||||
struct buffer_head *bh;
|
||||
int err;
|
||||
|
||||
err = nilfs_mdt_read_block(inode, block, 0, &bh);
|
||||
if (unlikely(err))
|
||||
return err;
|
||||
mark_buffer_dirty(bh);
|
||||
nilfs_mdt_mark_dirty(inode);
|
||||
brelse(bh);
|
||||
return 0;
|
||||
}
|
||||
|
||||
int nilfs_mdt_fetch_dirty(struct inode *inode)
|
||||
{
|
||||
struct nilfs_inode_info *ii = NILFS_I(inode);
|
||||
|
Reference in New Issue
Block a user