aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_fstype.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-11-08 14:55:03 +0000
committerSteven Whitehouse <swhiteho@redhat.com>2008-01-25 08:07:54 +0000
commitfd041f0b4045db8646b36d393cbb274db60649f5 (patch)
treedd09e7317eb471d45c685e3269bd3c20dc686f3e /fs/gfs2/ops_fstype.c
parent[GFS2] Don't add glocks to the journal (diff)
downloadlinux-dev-fd041f0b4045db8646b36d393cbb274db60649f5.tar.xz
linux-dev-fd041f0b4045db8646b36d393cbb274db60649f5.zip
[GFS2] Use atomic_t for journal free blocks counter
This patch changes the counter which keeps track of the free blocks in the journal to an atomic_t in preparation for the following patch which will update the log reservation code. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/gfs2/ops_fstype.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c
index 52aaba96d5da..1bba6ac0bcac 100644
--- a/fs/gfs2/ops_fstype.c
+++ b/fs/gfs2/ops_fstype.c
@@ -339,7 +339,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
if (sdp->sd_args.ar_spectator) {
sdp->sd_jdesc = gfs2_jdesc_find(sdp, 0);
- sdp->sd_log_blks_free = sdp->sd_jdesc->jd_blocks;
+ atomic_set(&sdp->sd_log_blks_free, sdp->sd_jdesc->jd_blocks);
} else {
if (sdp->sd_lockstruct.ls_jid >= gfs2_jindex_size(sdp)) {
fs_err(sdp, "can't mount journal #%u\n",
@@ -376,7 +376,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
sdp->sd_jdesc->jd_jid, error);
goto fail_jinode_gh;
}
- sdp->sd_log_blks_free = sdp->sd_jdesc->jd_blocks;
+ atomic_set(&sdp->sd_log_blks_free, sdp->sd_jdesc->jd_blocks);
}
if (sdp->sd_lockstruct.ls_first) {