diff options
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 1602cd00dd45..1ff90625860f 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -120,9 +120,9 @@ out_no_tfm: | |||
120 | static void | 120 | static void |
121 | nfsd4_sync_rec_dir(void) | 121 | nfsd4_sync_rec_dir(void) |
122 | { | 122 | { |
123 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); | 123 | mutex_lock(&rec_dir.path.dentry->d_inode->i_mutex); |
124 | nfsd_sync_dir(rec_dir.dentry); | 124 | nfsd_sync_dir(rec_dir.path.dentry); |
125 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); | 125 | mutex_unlock(&rec_dir.path.dentry->d_inode->i_mutex); |
126 | } | 126 | } |
127 | 127 | ||
128 | int | 128 | int |
@@ -142,9 +142,9 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
142 | nfs4_save_user(&uid, &gid); | 142 | nfs4_save_user(&uid, &gid); |
143 | 143 | ||
144 | /* lock the parent */ | 144 | /* lock the parent */ |
145 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); | 145 | mutex_lock(&rec_dir.path.dentry->d_inode->i_mutex); |
146 | 146 | ||
147 | dentry = lookup_one_len(dname, rec_dir.dentry, HEXDIR_LEN-1); | 147 | dentry = lookup_one_len(dname, rec_dir.path.dentry, HEXDIR_LEN-1); |
148 | if (IS_ERR(dentry)) { | 148 | if (IS_ERR(dentry)) { |
149 | status = PTR_ERR(dentry); | 149 | status = PTR_ERR(dentry); |
150 | goto out_unlock; | 150 | goto out_unlock; |
@@ -154,11 +154,11 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
154 | dprintk("NFSD: nfsd4_create_clid_dir: DIRECTORY EXISTS\n"); | 154 | dprintk("NFSD: nfsd4_create_clid_dir: DIRECTORY EXISTS\n"); |
155 | goto out_put; | 155 | goto out_put; |
156 | } | 156 | } |
157 | status = vfs_mkdir(rec_dir.dentry->d_inode, dentry, S_IRWXU); | 157 | status = vfs_mkdir(rec_dir.path.dentry->d_inode, dentry, S_IRWXU); |
158 | out_put: | 158 | out_put: |
159 | dput(dentry); | 159 | dput(dentry); |
160 | out_unlock: | 160 | out_unlock: |
161 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); | 161 | mutex_unlock(&rec_dir.path.dentry->d_inode->i_mutex); |
162 | if (status == 0) { | 162 | if (status == 0) { |
163 | clp->cl_firststate = 1; | 163 | clp->cl_firststate = 1; |
164 | nfsd4_sync_rec_dir(); | 164 | nfsd4_sync_rec_dir(); |
@@ -221,7 +221,7 @@ nfsd4_list_rec_dir(struct dentry *dir, recdir_func *f) | |||
221 | 221 | ||
222 | nfs4_save_user(&uid, &gid); | 222 | nfs4_save_user(&uid, &gid); |
223 | 223 | ||
224 | filp = dentry_open(dget(dir), mntget(rec_dir.mnt), O_RDONLY); | 224 | filp = dentry_open(dget(dir), mntget(rec_dir.path.mnt), O_RDONLY); |
225 | status = PTR_ERR(filp); | 225 | status = PTR_ERR(filp); |
226 | if (IS_ERR(filp)) | 226 | if (IS_ERR(filp)) |
227 | goto out; | 227 | goto out; |
@@ -286,9 +286,9 @@ nfsd4_unlink_clid_dir(char *name, int namlen) | |||
286 | 286 | ||
287 | dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name); | 287 | dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name); |
288 | 288 | ||
289 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); | 289 | mutex_lock(&rec_dir.path.dentry->d_inode->i_mutex); |
290 | dentry = lookup_one_len(name, rec_dir.dentry, namlen); | 290 | dentry = lookup_one_len(name, rec_dir.path.dentry, namlen); |
291 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); | 291 | mutex_unlock(&rec_dir.path.dentry->d_inode->i_mutex); |
292 | if (IS_ERR(dentry)) { | 292 | if (IS_ERR(dentry)) { |
293 | status = PTR_ERR(dentry); | 293 | status = PTR_ERR(dentry); |
294 | return status; | 294 | return status; |
@@ -297,7 +297,7 @@ nfsd4_unlink_clid_dir(char *name, int namlen) | |||
297 | if (!dentry->d_inode) | 297 | if (!dentry->d_inode) |
298 | goto out; | 298 | goto out; |
299 | 299 | ||
300 | status = nfsd4_clear_clid_dir(rec_dir.dentry, dentry); | 300 | status = nfsd4_clear_clid_dir(rec_dir.path.dentry, dentry); |
301 | out: | 301 | out: |
302 | dput(dentry); | 302 | dput(dentry); |
303 | return status; | 303 | return status; |
@@ -347,12 +347,12 @@ nfsd4_recdir_purge_old(void) { | |||
347 | 347 | ||
348 | if (!rec_dir_init) | 348 | if (!rec_dir_init) |
349 | return; | 349 | return; |
350 | status = nfsd4_list_rec_dir(rec_dir.dentry, purge_old); | 350 | status = nfsd4_list_rec_dir(rec_dir.path.dentry, purge_old); |
351 | if (status == 0) | 351 | if (status == 0) |
352 | nfsd4_sync_rec_dir(); | 352 | nfsd4_sync_rec_dir(); |
353 | if (status) | 353 | if (status) |
354 | printk("nfsd4: failed to purge old clients from recovery" | 354 | printk("nfsd4: failed to purge old clients from recovery" |
355 | " directory %s\n", rec_dir.dentry->d_name.name); | 355 | " directory %s\n", rec_dir.path.dentry->d_name.name); |
356 | return; | 356 | return; |
357 | } | 357 | } |
358 | 358 | ||
@@ -373,10 +373,10 @@ int | |||
373 | nfsd4_recdir_load(void) { | 373 | nfsd4_recdir_load(void) { |
374 | int status; | 374 | int status; |
375 | 375 | ||
376 | status = nfsd4_list_rec_dir(rec_dir.dentry, load_recdir); | 376 | status = nfsd4_list_rec_dir(rec_dir.path.dentry, load_recdir); |
377 | if (status) | 377 | if (status) |
378 | printk("nfsd4: failed loading clients from recovery" | 378 | printk("nfsd4: failed loading clients from recovery" |
379 | " directory %s\n", rec_dir.dentry->d_name.name); | 379 | " directory %s\n", rec_dir.path.dentry->d_name.name); |
380 | return status; | 380 | return status; |
381 | } | 381 | } |
382 | 382 | ||
@@ -415,5 +415,5 @@ nfsd4_shutdown_recdir(void) | |||
415 | if (!rec_dir_init) | 415 | if (!rec_dir_init) |
416 | return; | 416 | return; |
417 | rec_dir_init = 0; | 417 | rec_dir_init = 0; |
418 | path_release(&rec_dir); | 418 | path_put(&rec_dir.path); |
419 | } | 419 | } |