aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/ops_super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/ops_super.c')
-rw-r--r--fs/gfs2/ops_super.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/gfs2/ops_super.c b/fs/gfs2/ops_super.c
index 48a94522406e..10f70ee12161 100644
--- a/fs/gfs2/ops_super.c
+++ b/fs/gfs2/ops_super.c
@@ -18,9 +18,12 @@
18#include <linux/mount.h> 18#include <linux/mount.h>
19#include <linux/kthread.h> 19#include <linux/kthread.h>
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/gfs2_ondisk.h>
21#include <asm/semaphore.h> 22#include <asm/semaphore.h>
22 23
23#include "gfs2.h" 24#include "gfs2.h"
25#include "lm_interface.h"
26#include "incore.h"
24#include "glock.h" 27#include "glock.h"
25#include "inode.h" 28#include "inode.h"
26#include "lm.h" 29#include "lm.h"
@@ -33,6 +36,7 @@
33#include "rgrp.h" 36#include "rgrp.h"
34#include "super.h" 37#include "super.h"
35#include "sys.h" 38#include "sys.h"
39#include "util.h"
36 40
37/** 41/**
38 * gfs2_write_inode - Make sure the inode is stable on the disk 42 * gfs2_write_inode - Make sure the inode is stable on the disk
@@ -44,7 +48,7 @@
44 48
45static int gfs2_write_inode(struct inode *inode, int sync) 49static int gfs2_write_inode(struct inode *inode, int sync)
46{ 50{
47 struct gfs2_inode *ip = get_v2ip(inode); 51 struct gfs2_inode *ip = inode->u.generic_ip;
48 52
49 if (current->flags & PF_MEMALLOC) 53 if (current->flags & PF_MEMALLOC)
50 return 0; 54 return 0;
@@ -62,7 +66,7 @@ static int gfs2_write_inode(struct inode *inode, int sync)
62 66
63static void gfs2_put_super(struct super_block *sb) 67static void gfs2_put_super(struct super_block *sb)
64{ 68{
65 struct gfs2_sbd *sdp = get_v2sdp(sb); 69 struct gfs2_sbd *sdp = sb->s_fs_info;
66 int error; 70 int error;
67 71
68 if (!sdp) 72 if (!sdp)
@@ -138,7 +142,7 @@ static void gfs2_put_super(struct super_block *sb)
138 142
139 vfree(sdp); 143 vfree(sdp);
140 144
141 set_v2sdp(sb, NULL); 145 sb->s_fs_info = NULL;
142} 146}
143 147
144/** 148/**
@@ -151,7 +155,7 @@ static void gfs2_put_super(struct super_block *sb)
151 155
152static void gfs2_write_super(struct super_block *sb) 156static void gfs2_write_super(struct super_block *sb)
153{ 157{
154 struct gfs2_sbd *sdp = get_v2sdp(sb); 158 struct gfs2_sbd *sdp = sb->s_fs_info;
155 gfs2_log_flush(sdp); 159 gfs2_log_flush(sdp);
156} 160}
157 161
@@ -163,7 +167,7 @@ static void gfs2_write_super(struct super_block *sb)
163 167
164static void gfs2_write_super_lockfs(struct super_block *sb) 168static void gfs2_write_super_lockfs(struct super_block *sb)
165{ 169{
166 struct gfs2_sbd *sdp = get_v2sdp(sb); 170 struct gfs2_sbd *sdp = sb->s_fs_info;
167 int error; 171 int error;
168 172
169 for (;;) { 173 for (;;) {
@@ -194,7 +198,7 @@ static void gfs2_write_super_lockfs(struct super_block *sb)
194 198
195static void gfs2_unlockfs(struct super_block *sb) 199static void gfs2_unlockfs(struct super_block *sb)
196{ 200{
197 struct gfs2_sbd *sdp = get_v2sdp(sb); 201 struct gfs2_sbd *sdp = sb->s_fs_info;
198 gfs2_unfreeze_fs(sdp); 202 gfs2_unfreeze_fs(sdp);
199} 203}
200 204
@@ -208,7 +212,7 @@ static void gfs2_unlockfs(struct super_block *sb)
208 212
209static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf) 213static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
210{ 214{
211 struct gfs2_sbd *sdp = get_v2sdp(sb); 215 struct gfs2_sbd *sdp = sb->s_fs_info;
212 struct gfs2_statfs_change sc; 216 struct gfs2_statfs_change sc;
213 int error; 217 int error;
214 218
@@ -245,7 +249,7 @@ static int gfs2_statfs(struct super_block *sb, struct kstatfs *buf)
245 249
246static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) 250static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
247{ 251{
248 struct gfs2_sbd *sdp = get_v2sdp(sb); 252 struct gfs2_sbd *sdp = sb->s_fs_info;
249 int error; 253 int error;
250 254
251 error = gfs2_mount_args(sdp, data, 1); 255 error = gfs2_mount_args(sdp, data, 1);
@@ -283,12 +287,12 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data)
283 287
284static void gfs2_clear_inode(struct inode *inode) 288static void gfs2_clear_inode(struct inode *inode)
285{ 289{
286 struct gfs2_inode *ip = get_v2ip(inode); 290 struct gfs2_inode *ip = inode->u.generic_ip;
287 291
288 if (ip) { 292 if (ip) {
289 spin_lock(&ip->i_spin); 293 spin_lock(&ip->i_spin);
290 ip->i_vnode = NULL; 294 ip->i_vnode = NULL;
291 set_v2ip(inode, NULL); 295 inode->u.generic_ip = NULL;
292 spin_unlock(&ip->i_spin); 296 spin_unlock(&ip->i_spin);
293 297
294 gfs2_glock_schedule_for_reclaim(ip->i_gl); 298 gfs2_glock_schedule_for_reclaim(ip->i_gl);
@@ -306,7 +310,7 @@ static void gfs2_clear_inode(struct inode *inode)
306 310
307static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) 311static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
308{ 312{
309 struct gfs2_sbd *sdp = get_v2sdp(mnt->mnt_sb); 313 struct gfs2_sbd *sdp = mnt->mnt_sb->s_fs_info;
310 struct gfs2_args *args = &sdp->sd_args; 314 struct gfs2_args *args = &sdp->sd_args;
311 315
312 if (args->ar_lockproto[0]) 316 if (args->ar_lockproto[0])