浏览代码

[GFS2] Misc fixups

This patch contains two small fixups that didn't fit elsewhere.
They are: (1) get rid of temp variable in find_metapath.
(2) Remove vestigial "ret" variable from gfs2_writepage_common.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Bob Peterson 17 年之前
父节点
当前提交
7eabb77e65
共有 2 个文件被更改,包括 2 次插入5 次删除
  1. 1 2
      fs/gfs2/bmap.c
  2. 1 3
      fs/gfs2/ops_address.c

+ 1 - 2
fs/gfs2/bmap.c

@@ -305,11 +305,10 @@ static void find_metapath(struct gfs2_inode *ip, u64 block,
 			  struct metapath *mp)
 			  struct metapath *mp)
 {
 {
 	struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
 	struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
-	u64 b = block;
 	unsigned int i;
 	unsigned int i;
 
 
 	for (i = ip->i_height; i--;)
 	for (i = ip->i_height; i--;)
-		mp->mp_list[i] = do_div(b, sdp->sd_inptrs);
+		mp->mp_list[i] = do_div(block, sdp->sd_inptrs);
 
 
 }
 }
 
 

+ 1 - 3
fs/gfs2/ops_address.c

@@ -1,6 +1,6 @@
 /*
 /*
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
  * Copyright (C) Sistina Software, Inc.  1997-2003 All rights reserved.
- * Copyright (C) 2004-2007 Red Hat, Inc.  All rights reserved.
+ * Copyright (C) 2004-2008 Red Hat, Inc.  All rights reserved.
  *
  *
  * This copyrighted material is made available to anyone wishing to use,
  * This copyrighted material is made available to anyone wishing to use,
  * modify, copy, or redistribute it subject to the terms and conditions
  * modify, copy, or redistribute it subject to the terms and conditions
@@ -104,11 +104,9 @@ static int gfs2_writepage_common(struct page *page,
 	loff_t i_size = i_size_read(inode);
 	loff_t i_size = i_size_read(inode);
 	pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
 	pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
 	unsigned offset;
 	unsigned offset;
-	int ret = -EIO;
 
 
 	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
 	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
 		goto out;
 		goto out;
-	ret = 0;
 	if (current->journal_info)
 	if (current->journal_info)
 		goto redirty;
 		goto redirty;
 	/* Is the page fully outside i_size? (truncate in progress) */
 	/* Is the page fully outside i_size? (truncate in progress) */