diff options
Diffstat (limited to 'fs/nfsd/nfs4recover.c')
-rw-r--r-- | fs/nfsd/nfs4recover.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/nfsd/nfs4recover.c b/fs/nfsd/nfs4recover.c index 954cf893d50c..be963a133aaa 100644 --- a/fs/nfsd/nfs4recover.c +++ b/fs/nfsd/nfs4recover.c | |||
@@ -121,9 +121,9 @@ out: | |||
121 | static void | 121 | static void |
122 | nfsd4_sync_rec_dir(void) | 122 | nfsd4_sync_rec_dir(void) |
123 | { | 123 | { |
124 | down(&rec_dir.dentry->d_inode->i_sem); | 124 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); |
125 | nfsd_sync_dir(rec_dir.dentry); | 125 | nfsd_sync_dir(rec_dir.dentry); |
126 | up(&rec_dir.dentry->d_inode->i_sem); | 126 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); |
127 | } | 127 | } |
128 | 128 | ||
129 | int | 129 | int |
@@ -143,7 +143,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
143 | nfs4_save_user(&uid, &gid); | 143 | nfs4_save_user(&uid, &gid); |
144 | 144 | ||
145 | /* lock the parent */ | 145 | /* lock the parent */ |
146 | down(&rec_dir.dentry->d_inode->i_sem); | 146 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); |
147 | 147 | ||
148 | dentry = lookup_one_len(dname, rec_dir.dentry, HEXDIR_LEN-1); | 148 | dentry = lookup_one_len(dname, rec_dir.dentry, HEXDIR_LEN-1); |
149 | if (IS_ERR(dentry)) { | 149 | if (IS_ERR(dentry)) { |
@@ -159,7 +159,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) | |||
159 | out_put: | 159 | out_put: |
160 | dput(dentry); | 160 | dput(dentry); |
161 | out_unlock: | 161 | out_unlock: |
162 | up(&rec_dir.dentry->d_inode->i_sem); | 162 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); |
163 | if (status == 0) { | 163 | if (status == 0) { |
164 | clp->cl_firststate = 1; | 164 | clp->cl_firststate = 1; |
165 | nfsd4_sync_rec_dir(); | 165 | nfsd4_sync_rec_dir(); |
@@ -259,9 +259,9 @@ nfsd4_remove_clid_file(struct dentry *dir, struct dentry *dentry) | |||
259 | printk("nfsd4: non-file found in client recovery directory\n"); | 259 | printk("nfsd4: non-file found in client recovery directory\n"); |
260 | return -EINVAL; | 260 | return -EINVAL; |
261 | } | 261 | } |
262 | down(&dir->d_inode->i_sem); | 262 | mutex_lock(&dir->d_inode->i_mutex); |
263 | status = vfs_unlink(dir->d_inode, dentry); | 263 | status = vfs_unlink(dir->d_inode, dentry); |
264 | up(&dir->d_inode->i_sem); | 264 | mutex_unlock(&dir->d_inode->i_mutex); |
265 | return status; | 265 | return status; |
266 | } | 266 | } |
267 | 267 | ||
@@ -274,9 +274,9 @@ nfsd4_clear_clid_dir(struct dentry *dir, struct dentry *dentry) | |||
274 | * any regular files anyway, just in case the directory was created by | 274 | * any regular files anyway, just in case the directory was created by |
275 | * a kernel from the future.... */ | 275 | * a kernel from the future.... */ |
276 | nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file); | 276 | nfsd4_list_rec_dir(dentry, nfsd4_remove_clid_file); |
277 | down(&dir->d_inode->i_sem); | 277 | mutex_lock(&dir->d_inode->i_mutex); |
278 | status = vfs_rmdir(dir->d_inode, dentry); | 278 | status = vfs_rmdir(dir->d_inode, dentry); |
279 | up(&dir->d_inode->i_sem); | 279 | mutex_unlock(&dir->d_inode->i_mutex); |
280 | return status; | 280 | return status; |
281 | } | 281 | } |
282 | 282 | ||
@@ -288,9 +288,9 @@ nfsd4_unlink_clid_dir(char *name, int namlen) | |||
288 | 288 | ||
289 | dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name); | 289 | dprintk("NFSD: nfsd4_unlink_clid_dir. name %.*s\n", namlen, name); |
290 | 290 | ||
291 | down(&rec_dir.dentry->d_inode->i_sem); | 291 | mutex_lock(&rec_dir.dentry->d_inode->i_mutex); |
292 | dentry = lookup_one_len(name, rec_dir.dentry, namlen); | 292 | dentry = lookup_one_len(name, rec_dir.dentry, namlen); |
293 | up(&rec_dir.dentry->d_inode->i_sem); | 293 | mutex_unlock(&rec_dir.dentry->d_inode->i_mutex); |
294 | if (IS_ERR(dentry)) { | 294 | if (IS_ERR(dentry)) { |
295 | status = PTR_ERR(dentry); | 295 | status = PTR_ERR(dentry); |
296 | return status; | 296 | return status; |