Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4bcec184 authored by Mark Fasheh's avatar Mark Fasheh
Browse files

ocfs2: remove unused handle argument from ocfs2_meta_lock_full()



Now that this is unused and all callers pass NULL, we can safely remove it.

Signed-off-by: default avatarMark Fasheh <mark.fasheh@oracle.com>
parent a301a27d
Loading
Loading
Loading
Loading
+2 −5
Original line number Original line Diff line number Diff line
@@ -1152,7 +1152,7 @@ static int __ocfs2_flush_truncate_log(struct ocfs2_super *osb)


	mutex_lock(&data_alloc_inode->i_mutex);
	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) {
	if (status < 0) {
		mlog_errno(status);
		mlog_errno(status);
		goto out_mutex;
		goto out_mutex;
@@ -2003,10 +2003,7 @@ int ocfs2_prepare_truncate(struct ocfs2_super *osb,
		mutex_lock(&ext_alloc_inode->i_mutex);
		mutex_lock(&ext_alloc_inode->i_mutex);
		(*tc)->tc_ext_alloc_inode = ext_alloc_inode;
		(*tc)->tc_ext_alloc_inode = ext_alloc_inode;


		status = ocfs2_meta_lock(ext_alloc_inode,
		status = ocfs2_meta_lock(ext_alloc_inode, &ext_alloc_bh, 1);
					 NULL,
					 &ext_alloc_bh,
					 1);
		if (status < 0) {
		if (status < 0) {
			mlog_errno(status);
			mlog_errno(status);
			goto bail;
			goto bail;
+4 −4
Original line number Original line Diff line number Diff line
@@ -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));
	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 != 0) {
		if (ret == AOP_TRUNCATED_PAGE)
		if (ret == AOP_TRUNCATED_PAGE)
			unlock = 0;
			unlock = 0;
@@ -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);
	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) {
	if (ret != 0) {
		mlog_errno(ret);
		mlog_errno(ret);
		goto out;
		goto out;
@@ -412,7 +412,7 @@ static int ocfs2_commit_write(struct file *file, struct page *page,
	 *    stale inode allocation image (i_size, i_clusters, etc).
	 *    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) {
	if (ret != 0) {
		mlog_errno(ret);
		mlog_errno(ret);
		goto out;
		goto out;
@@ -490,7 +490,7 @@ static sector_t ocfs2_bmap(struct address_space *mapping, sector_t block)
	 * accessed concurrently from multiple nodes.
	 * accessed concurrently from multiple nodes.
	 */
	 */
	if (!INODE_JOURNAL(inode)) {
	if (!INODE_JOURNAL(inode)) {
		err = ocfs2_meta_lock(inode, NULL, NULL, 0);
		err = ocfs2_meta_lock(inode, NULL, 0);
		if (err) {
		if (err) {
			if (err != -ENOENT)
			if (err != -ENOENT)
				mlog_errno(err);
				mlog_errno(err);
+1 −1
Original line number Original line Diff line number Diff line
@@ -89,7 +89,7 @@ int ocfs2_readdir(struct file * filp, void * dirent, filldir_t filldir)
	stored = 0;
	stored = 0;
	bh = NULL;
	bh = NULL;


	error = ocfs2_meta_lock(inode, NULL, NULL, 0);
	error = ocfs2_meta_lock(inode, NULL, 0);
	if (error < 0) {
	if (error < 0) {
		if (error != -ENOENT)
		if (error != -ENOENT)
			mlog_errno(error);
			mlog_errno(error);
+2 −5
Original line number Original line Diff line number Diff line
@@ -1579,7 +1579,6 @@ static int ocfs2_assign_bh(struct inode *inode,
 * the result of the lock will be communicated via the callback.
 * the result of the lock will be communicated via the callback.
 */
 */
int ocfs2_meta_lock_full(struct inode *inode,
int ocfs2_meta_lock_full(struct inode *inode,
			 struct ocfs2_journal_handle *handle,
			 struct buffer_head **ret_bh,
			 struct buffer_head **ret_bh,
			 int ex,
			 int ex,
			 int arg_flags)
			 int arg_flags)
@@ -1707,18 +1706,16 @@ int ocfs2_meta_lock_full(struct inode *inode,
 * the lock inversion simply.
 * the lock inversion simply.
 */
 */
int ocfs2_meta_lock_with_page(struct inode *inode,
int ocfs2_meta_lock_with_page(struct inode *inode,
			      struct ocfs2_journal_handle *handle,
			      struct buffer_head **ret_bh,
			      struct buffer_head **ret_bh,
			      int ex,
			      int ex,
			      struct page *page)
			      struct page *page)
{
{
	int ret;
	int ret;


	ret = ocfs2_meta_lock_full(inode, handle, ret_bh, ex,
	ret = ocfs2_meta_lock_full(inode, ret_bh, ex, OCFS2_LOCK_NONBLOCK);
				   OCFS2_LOCK_NONBLOCK);
	if (ret == -EAGAIN) {
	if (ret == -EAGAIN) {
		unlock_page(page);
		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);
			ocfs2_meta_unlock(inode, ex);
		ret = AOP_TRUNCATED_PAGE;
		ret = AOP_TRUNCATED_PAGE;
	}
	}
+1 −3
Original line number Original line Diff line number Diff line
@@ -81,18 +81,16 @@ void ocfs2_data_unlock(struct inode *inode,
int ocfs2_rw_lock(struct inode *inode, int write);
int ocfs2_rw_lock(struct inode *inode, int write);
void ocfs2_rw_unlock(struct inode *inode, int write);
void ocfs2_rw_unlock(struct inode *inode, int write);
int ocfs2_meta_lock_full(struct inode *inode,
int ocfs2_meta_lock_full(struct inode *inode,
			 struct ocfs2_journal_handle *handle,
			 struct buffer_head **ret_bh,
			 struct buffer_head **ret_bh,
			 int ex,
			 int ex,
			 int arg_flags);
			 int arg_flags);
int ocfs2_meta_lock_with_page(struct inode *inode,
int ocfs2_meta_lock_with_page(struct inode *inode,
			      struct ocfs2_journal_handle *handle,
			      struct buffer_head **ret_bh,
			      struct buffer_head **ret_bh,
			      int ex,
			      int ex,
			      struct page *page);
			      struct page *page);
/* 99% of the time we don't want to supply any additional flags --
/* 99% of the time we don't want to supply any additional flags --
 * those are for very specific cases only. */
 * 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,
void ocfs2_meta_unlock(struct inode *inode,
		       int ex);
		       int ex);
int ocfs2_super_lock(struct ocfs2_super *osb,
int ocfs2_super_lock(struct ocfs2_super *osb,
Loading