cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [GFS2 PATCH] GFS2: Use dirty_inode in gfs2_dir_add
Date: Tue, 13 Nov 2012 10:29:48 +0000	[thread overview]
Message-ID: <1352802588.2727.6.camel@menhir> (raw)
In-Reply-To: <792825860.37166892.1352743494531.JavaMail.root@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;
>  		}
> 




      reply	other threads:[~2012-11-13 10:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352802588.2727.6.camel@menhir \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).