Loading fs/ocfs2/alloc.c +2 −5 Original line number Diff line number Diff line Loading @@ -1152,7 +1152,7 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) mutex_lock(&data_alloc_inode->i_mutex); status = ocfs2_meta_lock(data_alloc_inode, NULL, &data_alloc_bh, 1); status = ocfs2_meta_lock(data_alloc_inode, &data_alloc_bh, 1); if (status < 0) { mlog_errno(status); goto out_mutex; Loading Loading @@ -2003,10 +2003,7 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb, mutex_lock(&ext_alloc_inode->i_mutex); (*tc)->tc_ext_alloc_inode = ext_alloc_inode; status = ocfs2_meta_lock(ext_alloc_inode, NULL, &ext_alloc_bh, 1); status = ocfs2_meta_lock(ext_alloc_inode, &ext_alloc_bh, 1); if (status < 0) { mlog_errno(status); goto bail; Loading fs/ocfs2/aops.c +4 −4 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) mlog_entry("(0x%p, %lu)\n", file, (page ? page->index : 0)); ret = ocfs2_meta_lock_with_page(inode, NULL, NULL, 0, page); ret = ocfs2_meta_lock_with_page(inode, NULL, 0, page); if (ret != 0) { if (ret == AOP_TRUNCATED_PAGE) unlock = 0; Loading Loading @@ -305,7 +305,7 @@ static int ocfs2_prepare_write(struct file *file, struct page *page, mlog_entry("(0x%p, 0x%p, %u, %u)\n", file, page, from, to); ret = ocfs2_meta_lock_with_page(inode, NULL, NULL, 0, page); ret = ocfs2_meta_lock_with_page(inode, NULL, 0, page); if (ret != 0) { mlog_errno(ret); goto out; Loading Loading @@ -412,7 +412,7 @@ static int ocfs2_commit_write(struct file *file, struct page *page, * stale inode allocation image (i_size, i_clusters, etc). */ ret = ocfs2_meta_lock_with_page(inode, NULL, &di_bh, 1, page); ret = ocfs2_meta_lock_with_page(inode, &di_bh, 1, page); if (ret != 0) { mlog_errno(ret); goto out; Loading Loading @@ -490,7 +490,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) * accessed concurrently from multiple nodes. */ if (!INODE_JOURNAL(inode)) { err = ocfs2_meta_lock(inode, NULL, NULL, 0); err = ocfs2_meta_lock(inode, NULL, 0); if (err) { if (err != -ENOENT) mlog_errno(err); Loading fs/ocfs2/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) stored = 0; bh = NULL; error = ocfs2_meta_lock(inode, NULL, NULL, 0); error = ocfs2_meta_lock(inode, NULL, 0); if (error < 0) { if (error != -ENOENT) mlog_errno(error); Loading fs/ocfs2/dlmglue.c +2 −5 Original line number Diff line number Diff line Loading @@ -1579,7 +1579,6 @@ static int ocfs2_assign_bh(struct inode *inode, * the result of the lock will be communicated via the callback. */ int ocfs2_meta_lock_full(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, int arg_flags) Loading Loading @@ -1707,18 +1706,16 @@ int ocfs2_meta_lock_full(struct inode *inode, * the lock inversion simply. */ int ocfs2_meta_lock_with_page(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, struct page *page) { int ret; ret = ocfs2_meta_lock_full(inode, handle, ret_bh, ex, OCFS2_LOCK_NONBLOCK); ret = ocfs2_meta_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); if (ret == -EAGAIN) { unlock_page(page); if (ocfs2_meta_lock(inode, handle, ret_bh, ex) == 0) if (ocfs2_meta_lock(inode, ret_bh, ex) == 0) ocfs2_meta_unlock(inode, ex); ret = AOP_TRUNCATED_PAGE; } Loading fs/ocfs2/dlmglue.h +1 −3 Original line number Diff line number Diff line Loading @@ -81,18 +81,16 @@ void ocfs2_data_unlock(struct inode *inode, int ocfs2_rw_lock(struct inode *inode, int write); void ocfs2_rw_unlock(struct inode *inode, int write); int ocfs2_meta_lock_full(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, int arg_flags); int ocfs2_meta_lock_with_page(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, struct page *page); /* 99% of the time we don't want to supply any additional flags -- * those are for very specific cases only. */ #define ocfs2_meta_lock(i, h, b, e) ocfs2_meta_lock_full(i, h, b, e, 0) #define ocfs2_meta_lock(i, b, e) ocfs2_meta_lock_full(i, b, e, 0) void ocfs2_meta_unlock(struct inode *inode, int ex); int ocfs2_super_lock(struct ocfs2_super *osb, Loading Loading
fs/ocfs2/alloc.c +2 −5 Original line number Diff line number Diff line Loading @@ -1152,7 +1152,7 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb) mutex_lock(&data_alloc_inode->i_mutex); status = ocfs2_meta_lock(data_alloc_inode, NULL, &data_alloc_bh, 1); status = ocfs2_meta_lock(data_alloc_inode, &data_alloc_bh, 1); if (status < 0) { mlog_errno(status); goto out_mutex; Loading Loading @@ -2003,10 +2003,7 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb, mutex_lock(&ext_alloc_inode->i_mutex); (*tc)->tc_ext_alloc_inode = ext_alloc_inode; status = ocfs2_meta_lock(ext_alloc_inode, NULL, &ext_alloc_bh, 1); status = ocfs2_meta_lock(ext_alloc_inode, &ext_alloc_bh, 1); if (status < 0) { mlog_errno(status); goto bail; Loading
fs/ocfs2/aops.c +4 −4 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static int ocfs2_readpage(struct file *file, struct page *page) mlog_entry("(0x%p, %lu)\n", file, (page ? page->index : 0)); ret = ocfs2_meta_lock_with_page(inode, NULL, NULL, 0, page); ret = ocfs2_meta_lock_with_page(inode, NULL, 0, page); if (ret != 0) { if (ret == AOP_TRUNCATED_PAGE) unlock = 0; Loading Loading @@ -305,7 +305,7 @@ static int ocfs2_prepare_write(struct file *file, struct page *page, mlog_entry("(0x%p, 0x%p, %u, %u)\n", file, page, from, to); ret = ocfs2_meta_lock_with_page(inode, NULL, NULL, 0, page); ret = ocfs2_meta_lock_with_page(inode, NULL, 0, page); if (ret != 0) { mlog_errno(ret); goto out; Loading Loading @@ -412,7 +412,7 @@ static int ocfs2_commit_write(struct file *file, struct page *page, * stale inode allocation image (i_size, i_clusters, etc). */ ret = ocfs2_meta_lock_with_page(inode, NULL, &di_bh, 1, page); ret = ocfs2_meta_lock_with_page(inode, &di_bh, 1, page); if (ret != 0) { mlog_errno(ret); goto out; Loading Loading @@ -490,7 +490,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block) * accessed concurrently from multiple nodes. */ if (!INODE_JOURNAL(inode)) { err = ocfs2_meta_lock(inode, NULL, NULL, 0); err = ocfs2_meta_lock(inode, NULL, 0); if (err) { if (err != -ENOENT) mlog_errno(err); Loading
fs/ocfs2/dir.c +1 −1 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir) stored = 0; bh = NULL; error = ocfs2_meta_lock(inode, NULL, NULL, 0); error = ocfs2_meta_lock(inode, NULL, 0); if (error < 0) { if (error != -ENOENT) mlog_errno(error); Loading
fs/ocfs2/dlmglue.c +2 −5 Original line number Diff line number Diff line Loading @@ -1579,7 +1579,6 @@ static int ocfs2_assign_bh(struct inode *inode, * the result of the lock will be communicated via the callback. */ int ocfs2_meta_lock_full(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, int arg_flags) Loading Loading @@ -1707,18 +1706,16 @@ int ocfs2_meta_lock_full(struct inode *inode, * the lock inversion simply. */ int ocfs2_meta_lock_with_page(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, struct page *page) { int ret; ret = ocfs2_meta_lock_full(inode, handle, ret_bh, ex, OCFS2_LOCK_NONBLOCK); ret = ocfs2_meta_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK); if (ret == -EAGAIN) { unlock_page(page); if (ocfs2_meta_lock(inode, handle, ret_bh, ex) == 0) if (ocfs2_meta_lock(inode, ret_bh, ex) == 0) ocfs2_meta_unlock(inode, ex); ret = AOP_TRUNCATED_PAGE; } Loading
fs/ocfs2/dlmglue.h +1 −3 Original line number Diff line number Diff line Loading @@ -81,18 +81,16 @@ void ocfs2_data_unlock(struct inode *inode, int ocfs2_rw_lock(struct inode *inode, int write); void ocfs2_rw_unlock(struct inode *inode, int write); int ocfs2_meta_lock_full(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, int arg_flags); int ocfs2_meta_lock_with_page(struct inode *inode, struct ocfs2_journal_handle *handle, struct buffer_head **ret_bh, int ex, struct page *page); /* 99% of the time we don't want to supply any additional flags -- * those are for very specific cases only. */ #define ocfs2_meta_lock(i, h, b, e) ocfs2_meta_lock_full(i, h, b, e, 0) #define ocfs2_meta_lock(i, b, e) ocfs2_meta_lock_full(i, b, e, 0) void ocfs2_meta_unlock(struct inode *inode, int ex); int ocfs2_super_lock(struct ocfs2_super *osb, Loading