diff options
author | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-17 21:51:42 -0500 |
---|---|---|
committer | Lachlan McIlroy <lachlan@redback.melbourne.sgi.com> | 2008-02-17 21:51:42 -0500 |
commit | c58310bf4933986513020fa90b4190c7492995ae (patch) | |
tree | 143f2c7578d02ebef5db8fc57ae69e951ae0e2ee /fs/afs | |
parent | 269cdfaf769f5cd831284cc831790c7c5038040f (diff) | |
parent | 1309d4e68497184d2fd87e892ddf14076c2bda98 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/dir.c | 4 | ||||
-rw-r--r-- | fs/afs/inode.c | 5 | ||||
-rw-r--r-- | fs/afs/mntpt.c | 23 | ||||
-rw-r--r-- | fs/afs/security.c | 4 | ||||
-rw-r--r-- | fs/afs/super.c | 5 |
5 files changed, 21 insertions, 20 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index 0cc3597c1197..b58af8f18bc4 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -512,7 +512,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, | |||
512 | key = afs_request_key(vnode->volume->cell); | 512 | key = afs_request_key(vnode->volume->cell); |
513 | if (IS_ERR(key)) { | 513 | if (IS_ERR(key)) { |
514 | _leave(" = %ld [key]", PTR_ERR(key)); | 514 | _leave(" = %ld [key]", PTR_ERR(key)); |
515 | return ERR_PTR(PTR_ERR(key)); | 515 | return ERR_CAST(key); |
516 | } | 516 | } |
517 | 517 | ||
518 | ret = afs_validate(vnode, key); | 518 | ret = afs_validate(vnode, key); |
@@ -540,7 +540,7 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, | |||
540 | key_put(key); | 540 | key_put(key); |
541 | if (IS_ERR(inode)) { | 541 | if (IS_ERR(inode)) { |
542 | _leave(" = %ld", PTR_ERR(inode)); | 542 | _leave(" = %ld", PTR_ERR(inode)); |
543 | return ERR_PTR(PTR_ERR(inode)); | 543 | return ERR_CAST(inode); |
544 | } | 544 | } |
545 | 545 | ||
546 | dentry->d_op = &afs_fs_dentry_operations; | 546 | dentry->d_op = &afs_fs_dentry_operations; |
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 84750c8e9f95..08db82e1343a 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -196,10 +196,7 @@ struct inode *afs_iget(struct super_block *sb, struct key *key, | |||
196 | 196 | ||
197 | /* failure */ | 197 | /* failure */ |
198 | bad_inode: | 198 | bad_inode: |
199 | make_bad_inode(inode); | 199 | iget_failed(inode); |
200 | unlock_new_inode(inode); | ||
201 | iput(inode); | ||
202 | |||
203 | _leave(" = %d [bad]", ret); | 200 | _leave(" = %d [bad]", ret); |
204 | return ERR_PTR(ret); | 201 | return ERR_PTR(ret); |
205 | } | 202 | } |
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 5ce43b63c60e..a3510b8ba3e7 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -218,16 +218,16 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
218 | _enter("%p{%s},{%s:%p{%s},}", | 218 | _enter("%p{%s},{%s:%p{%s},}", |
219 | dentry, | 219 | dentry, |
220 | dentry->d_name.name, | 220 | dentry->d_name.name, |
221 | nd->mnt->mnt_devname, | 221 | nd->path.mnt->mnt_devname, |
222 | dentry, | 222 | dentry, |
223 | nd->dentry->d_name.name); | 223 | nd->path.dentry->d_name.name); |
224 | 224 | ||
225 | dput(nd->dentry); | 225 | dput(nd->path.dentry); |
226 | nd->dentry = dget(dentry); | 226 | nd->path.dentry = dget(dentry); |
227 | 227 | ||
228 | newmnt = afs_mntpt_do_automount(nd->dentry); | 228 | newmnt = afs_mntpt_do_automount(nd->path.dentry); |
229 | if (IS_ERR(newmnt)) { | 229 | if (IS_ERR(newmnt)) { |
230 | path_release(nd); | 230 | path_put(&nd->path); |
231 | return (void *)newmnt; | 231 | return (void *)newmnt; |
232 | } | 232 | } |
233 | 233 | ||
@@ -235,17 +235,16 @@ static void *afs_mntpt_follow_link(struct dentry *dentry, struct nameidata *nd) | |||
235 | err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); | 235 | err = do_add_mount(newmnt, nd, MNT_SHRINKABLE, &afs_vfsmounts); |
236 | switch (err) { | 236 | switch (err) { |
237 | case 0: | 237 | case 0: |
238 | dput(nd->dentry); | 238 | path_put(&nd->path); |
239 | mntput(nd->mnt); | 239 | nd->path.mnt = newmnt; |
240 | nd->mnt = newmnt; | 240 | nd->path.dentry = dget(newmnt->mnt_root); |
241 | nd->dentry = dget(newmnt->mnt_root); | ||
242 | schedule_delayed_work(&afs_mntpt_expiry_timer, | 241 | schedule_delayed_work(&afs_mntpt_expiry_timer, |
243 | afs_mntpt_expiry_timeout * HZ); | 242 | afs_mntpt_expiry_timeout * HZ); |
244 | break; | 243 | break; |
245 | case -EBUSY: | 244 | case -EBUSY: |
246 | /* someone else made a mount here whilst we were busy */ | 245 | /* someone else made a mount here whilst we were busy */ |
247 | while (d_mountpoint(nd->dentry) && | 246 | while (d_mountpoint(nd->path.dentry) && |
248 | follow_down(&nd->mnt, &nd->dentry)) | 247 | follow_down(&nd->path.mnt, &nd->path.dentry)) |
249 | ; | 248 | ; |
250 | err = 0; | 249 | err = 0; |
251 | default: | 250 | default: |
diff --git a/fs/afs/security.c b/fs/afs/security.c index 566fe712c682..3bcbeceba1bb 100644 --- a/fs/afs/security.c +++ b/fs/afs/security.c | |||
@@ -95,7 +95,7 @@ static struct afs_vnode *afs_get_auth_inode(struct afs_vnode *vnode, | |||
95 | auth_inode = afs_iget(vnode->vfs_inode.i_sb, key, | 95 | auth_inode = afs_iget(vnode->vfs_inode.i_sb, key, |
96 | &vnode->status.parent, NULL, NULL); | 96 | &vnode->status.parent, NULL, NULL); |
97 | if (IS_ERR(auth_inode)) | 97 | if (IS_ERR(auth_inode)) |
98 | return ERR_PTR(PTR_ERR(auth_inode)); | 98 | return ERR_CAST(auth_inode); |
99 | } | 99 | } |
100 | 100 | ||
101 | auth_vnode = AFS_FS_I(auth_inode); | 101 | auth_vnode = AFS_FS_I(auth_inode); |
@@ -287,7 +287,7 @@ static int afs_check_permit(struct afs_vnode *vnode, struct key *key, | |||
287 | int afs_permission(struct inode *inode, int mask, struct nameidata *nd) | 287 | int afs_permission(struct inode *inode, int mask, struct nameidata *nd) |
288 | { | 288 | { |
289 | struct afs_vnode *vnode = AFS_FS_I(inode); | 289 | struct afs_vnode *vnode = AFS_FS_I(inode); |
290 | afs_access_t access; | 290 | afs_access_t uninitialized_var(access); |
291 | struct key *key; | 291 | struct key *key; |
292 | int ret; | 292 | int ret; |
293 | 293 | ||
diff --git a/fs/afs/super.c b/fs/afs/super.c index 4b2558c42213..36bbce45f44b 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -52,6 +52,7 @@ static const struct super_operations afs_super_ops = { | |||
52 | .clear_inode = afs_clear_inode, | 52 | .clear_inode = afs_clear_inode, |
53 | .umount_begin = afs_umount_begin, | 53 | .umount_begin = afs_umount_begin, |
54 | .put_super = afs_put_super, | 54 | .put_super = afs_put_super, |
55 | .show_options = generic_show_options, | ||
55 | }; | 56 | }; |
56 | 57 | ||
57 | static struct kmem_cache *afs_inode_cachep; | 58 | static struct kmem_cache *afs_inode_cachep; |
@@ -357,6 +358,7 @@ static int afs_get_sb(struct file_system_type *fs_type, | |||
357 | struct super_block *sb; | 358 | struct super_block *sb; |
358 | struct afs_volume *vol; | 359 | struct afs_volume *vol; |
359 | struct key *key; | 360 | struct key *key; |
361 | char *new_opts = kstrdup(options, GFP_KERNEL); | ||
360 | int ret; | 362 | int ret; |
361 | 363 | ||
362 | _enter(",,%s,%p", dev_name, options); | 364 | _enter(",,%s,%p", dev_name, options); |
@@ -408,9 +410,11 @@ static int afs_get_sb(struct file_system_type *fs_type, | |||
408 | deactivate_super(sb); | 410 | deactivate_super(sb); |
409 | goto error; | 411 | goto error; |
410 | } | 412 | } |
413 | sb->s_options = new_opts; | ||
411 | sb->s_flags |= MS_ACTIVE; | 414 | sb->s_flags |= MS_ACTIVE; |
412 | } else { | 415 | } else { |
413 | _debug("reuse"); | 416 | _debug("reuse"); |
417 | kfree(new_opts); | ||
414 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); | 418 | ASSERTCMP(sb->s_flags, &, MS_ACTIVE); |
415 | } | 419 | } |
416 | 420 | ||
@@ -424,6 +428,7 @@ error: | |||
424 | afs_put_volume(params.volume); | 428 | afs_put_volume(params.volume); |
425 | afs_put_cell(params.cell); | 429 | afs_put_cell(params.cell); |
426 | key_put(params.key); | 430 | key_put(params.key); |
431 | kfree(new_opts); | ||
427 | _leave(" = %d", ret); | 432 | _leave(" = %d", ret); |
428 | return ret; | 433 | return ret; |
429 | } | 434 | } |