[Ocfs2-commits] mfasheh commits r2643 - branches/locking-changes/fs/ocfs2

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Fri Oct 7 17:06:06 CDT 2005


Author: mfasheh
Date: 2005-10-07 17:06:05 -0500 (Fri, 07 Oct 2005)
New Revision: 2643

Modified:
   branches/locking-changes/fs/ocfs2/file.c
Log:
* sigh, di_bh wasn't ever actually used. Remove it entirely.



Modified: branches/locking-changes/fs/ocfs2/file.c
===================================================================
--- branches/locking-changes/fs/ocfs2/file.c	2005-10-07 21:37:03 UTC (rev 2642)
+++ branches/locking-changes/fs/ocfs2/file.c	2005-10-07 22:06:05 UTC (rev 2643)
@@ -618,7 +618,6 @@
  * to be too fragile to do exactly what we need without us having to
  * worry about recursive locking in ->commit_write(). */
 static int ocfs2_write_zero_page(struct inode *inode,
-				 struct buffer_head *di_bh,
 				 u64 size)
 {
 	struct address_space *mapping = inode->i_mapping;
@@ -682,19 +681,11 @@
 {
 	int ret = 0;
 	u64 start_off;
-	struct buffer_head *di_bh = NULL;
 	struct super_block *sb = inode->i_sb;
 
-	ret = ocfs2_read_block(OCFS2_SB(sb), OCFS2_I(inode)->ip_blkno, &di_bh,
-			       OCFS2_BH_CACHED, inode);
-	if (ret < 0) {
-		mlog_errno(ret);
-		goto out;
-	}
-
 	start_off = ocfs2_align_bytes_to_blocks(sb, i_size_read(inode));
 	while (start_off < zero_to_size) {
-		ret = ocfs2_write_zero_page(inode, di_bh, start_off);
+		ret = ocfs2_write_zero_page(inode, start_off);
 		if (ret < 0) {
 			mlog_errno(ret);
 			goto out;
@@ -704,9 +695,6 @@
 	}
 
 out:
-	if (di_bh)
-		brelse(di_bh);
-
 	return ret;
 }
 



More information about the Ocfs2-commits mailing list