cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [GFS2 PATCH] GFS2: Use dirty_inode in gfs2_dir_add
@ 2012-11-12 18:04 Bob Peterson
  2012-11-13 10:29 ` Steven Whitehouse
  0 siblings, 1 reply; 2+ messages in thread
From: Bob Peterson @ 2012-11-12 18:04 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

This patch changes the gfs2_dir_add function so that it uses
the dirty_inode function (via mark_inode_dirty) rather than manually
updating the dinode.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
---
diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
index 259b088..9a35670 100644
--- a/fs/gfs2/dir.c
+++ b/fs/gfs2/dir.c
@@ -1676,16 +1676,11 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
 				be16_add_cpu(&leaf->lf_entries, 1);
 			}
 			brelse(bh);
-			error = gfs2_meta_inode_buffer(ip, &bh);
-			if (error)
-				break;
-			gfs2_trans_add_bh(ip->i_gl, bh, 1);
 			ip->i_entries++;
 			ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
 			if (S_ISDIR(nip->i_inode.i_mode))
 				inc_nlink(&ip->i_inode);
-			gfs2_dinode_out(ip, bh->b_data);
-			brelse(bh);
+			mark_inode_dirty(inode);
 			error = 0;
 			break;
 		}



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

* [Cluster-devel] [GFS2 PATCH] GFS2: Use dirty_inode in gfs2_dir_add
  2012-11-12 18:04 [Cluster-devel] [GFS2 PATCH] GFS2: Use dirty_inode in gfs2_dir_add Bob Peterson
@ 2012-11-13 10:29 ` Steven Whitehouse
  0 siblings, 0 replies; 2+ messages in thread
From: Steven Whitehouse @ 2012-11-13 10:29 UTC (permalink / raw)
  To: cluster-devel.redhat.com

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Mon, 2012-11-12 at 13:04 -0500, Bob Peterson wrote:
> Hi,
> 
> This patch changes the gfs2_dir_add function so that it uses
> the dirty_inode function (via mark_inode_dirty) rather than manually
> updating the dinode.
> 
> Regards,
> 
> Bob Peterson
> Red Hat File Systems
> 
> Signed-off-by: Bob Peterson <rpeterso@redhat.com> 
> ---
> diff --git a/fs/gfs2/dir.c b/fs/gfs2/dir.c
> index 259b088..9a35670 100644
> --- a/fs/gfs2/dir.c
> +++ b/fs/gfs2/dir.c
> @@ -1676,16 +1676,11 @@ int gfs2_dir_add(struct inode *inode, const struct qstr *name,
>  				be16_add_cpu(&leaf->lf_entries, 1);
>  			}
>  			brelse(bh);
> -			error = gfs2_meta_inode_buffer(ip, &bh);
> -			if (error)
> -				break;
> -			gfs2_trans_add_bh(ip->i_gl, bh, 1);
>  			ip->i_entries++;
>  			ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME;
>  			if (S_ISDIR(nip->i_inode.i_mode))
>  				inc_nlink(&ip->i_inode);
> -			gfs2_dinode_out(ip, bh->b_data);
> -			brelse(bh);
> +			mark_inode_dirty(inode);
>  			error = 0;
>  			break;
>  		}
> 




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

end of thread, other threads:[~2012-11-13 10:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-12 18:04 [Cluster-devel] [GFS2 PATCH] GFS2: Use dirty_inode in gfs2_dir_add Bob Peterson
2012-11-13 10:29 ` 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).