cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH] Misc fixups
@ 2008-01-28 17:24 Bob Peterson
  2008-01-29  8:33 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2008-01-28 17:24 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

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.

Regards,

Bob Peterson
Red Hat GFS

Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
--
 fs/gfs2/bmap.c        |    3 +--
 fs/gfs2/ops_address.c |    4 +---
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index 2a90084..359231e 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -305,11 +305,10 @@ static void find_metapath(struct gfs2_inode *ip, u64 block,
 			  struct metapath *mp)
 {
 	struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
-	u64 b = block;
 	unsigned int 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);
 
 }
 
diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
index 38dbe99..e601016 100644
--- a/fs/gfs2/ops_address.c
+++ b/fs/gfs2/ops_address.c
@@ -1,6 +1,6 @@
 /*
  * 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,
  * 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);
 	pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
 	unsigned offset;
-	int ret = -EIO;
 
 	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
 		goto out;
-	ret = 0;
 	if (current->journal_info)
 		goto redirty;
 	/* Is the page fully outside i_size? (truncate in progress) */




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Cluster-devel] [GFS2 PATCH] Misc fixups
  2008-01-28 17:24 [Cluster-devel] [GFS2 PATCH] Misc fixups Bob Peterson
@ 2008-01-29  8:33 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2008-01-29  8:33 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the -nmw tree. Thanks,

Steve.

On Mon, 2008-01-28 at 11:24 -0600, Bob Peterson wrote:
> Hi,
> 
> 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.
> 
> Regards,
> 
> Bob Peterson
> Red Hat GFS
> 
> Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
> --
>  fs/gfs2/bmap.c        |    3 +--
>  fs/gfs2/ops_address.c |    4 +---
>  2 files changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
> index 2a90084..359231e 100644
> --- a/fs/gfs2/bmap.c
> +++ b/fs/gfs2/bmap.c
> @@ -305,11 +305,10 @@ static void find_metapath(struct gfs2_inode *ip, u64 block,
>  			  struct metapath *mp)
>  {
>  	struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode);
> -	u64 b = block;
>  	unsigned int 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);
>  
>  }
>  
> diff --git a/fs/gfs2/ops_address.c b/fs/gfs2/ops_address.c
> index 38dbe99..e601016 100644
> --- a/fs/gfs2/ops_address.c
> +++ b/fs/gfs2/ops_address.c
> @@ -1,6 +1,6 @@
>  /*
>   * 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,
>   * 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);
>  	pgoff_t end_index = i_size >> PAGE_CACHE_SHIFT;
>  	unsigned offset;
> -	int ret = -EIO;
>  
>  	if (gfs2_assert_withdraw(sdp, gfs2_glock_is_held_excl(ip->i_gl)))
>  		goto out;
> -	ret = 0;
>  	if (current->journal_info)
>  		goto redirty;
>  	/* Is the page fully outside i_size? (truncate in progress) */
> 
> 



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2008-01-29  8:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-28 17:24 [Cluster-devel] [GFS2 PATCH] Misc fixups Bob Peterson
2008-01-29  8:33 ` Steven Whitehouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).