Commit a49762fd authored by Ryusuke Konishi's avatar Ryusuke Konishi

nilfs2: remove buffer locking in nilfs_mark_inode_dirty

This lock is eliminable because inodes on the buffer can be updated
independently.  Although a log writer also fills in bmap data on the
on-disk inodes, this update is exclusively done by a log writer lock.
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent e2073e78
...@@ -525,7 +525,6 @@ void nilfs_update_inode(struct inode *inode, struct buffer_head *ibh) ...@@ -525,7 +525,6 @@ void nilfs_update_inode(struct inode *inode, struct buffer_head *ibh)
raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, ibh); raw_inode = nilfs_ifile_map_inode(sbi->s_ifile, ino, ibh);
/* The buffer is guarded with lock_buffer() by the caller */
if (test_and_clear_bit(NILFS_I_NEW, &ii->i_state)) if (test_and_clear_bit(NILFS_I_NEW, &ii->i_state))
memset(raw_inode, 0, NILFS_MDT(sbi->s_ifile)->mi_entry_size); memset(raw_inode, 0, NILFS_MDT(sbi->s_ifile)->mi_entry_size);
set_bit(NILFS_I_INODE_DIRTY, &ii->i_state); set_bit(NILFS_I_INODE_DIRTY, &ii->i_state);
...@@ -745,9 +744,7 @@ int nilfs_mark_inode_dirty(struct inode *inode) ...@@ -745,9 +744,7 @@ int nilfs_mark_inode_dirty(struct inode *inode)
"failed to reget inode block.\n"); "failed to reget inode block.\n");
return err; return err;
} }
lock_buffer(ibh);
nilfs_update_inode(inode, ibh); nilfs_update_inode(inode, ibh);
unlock_buffer(ibh);
nilfs_mdt_mark_buffer_dirty(ibh); nilfs_mdt_mark_buffer_dirty(ibh);
nilfs_mdt_mark_dirty(sbi->s_ifile); nilfs_mdt_mark_dirty(sbi->s_ifile);
brelse(ibh); brelse(ibh);
......
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