diff options
author | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
---|---|---|
committer | Jonathan Herman <hermanjl@cs.unc.edu> | 2013-01-17 16:15:55 -0500 |
commit | 8dea78da5cee153b8af9c07a2745f6c55057fe12 (patch) | |
tree | a8f4d49d63b1ecc92f2fddceba0655b2472c5bd9 /fs/afs | |
parent | 406089d01562f1e2bf9f089fd7637009ebaad589 (diff) |
Patched in Tegra support.
Diffstat (limited to 'fs/afs')
-rw-r--r-- | fs/afs/callback.c | 4 | ||||
-rw-r--r-- | fs/afs/dir.c | 26 | ||||
-rw-r--r-- | fs/afs/file.c | 2 | ||||
-rw-r--r-- | fs/afs/fsclient.c | 10 | ||||
-rw-r--r-- | fs/afs/inode.c | 6 | ||||
-rw-r--r-- | fs/afs/internal.h | 2 | ||||
-rw-r--r-- | fs/afs/mntpt.c | 12 | ||||
-rw-r--r-- | fs/afs/rxrpc.c | 3 | ||||
-rw-r--r-- | fs/afs/server.c | 10 | ||||
-rw-r--r-- | fs/afs/super.c | 16 | ||||
-rw-r--r-- | fs/afs/vlocation.c | 14 |
11 files changed, 59 insertions, 46 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c index 7ef637d7f3a..587ef5123cd 100644 --- a/fs/afs/callback.c +++ b/fs/afs/callback.c | |||
@@ -351,7 +351,9 @@ void afs_dispatch_give_up_callbacks(struct work_struct *work) | |||
351 | */ | 351 | */ |
352 | void afs_flush_callback_breaks(struct afs_server *server) | 352 | void afs_flush_callback_breaks(struct afs_server *server) |
353 | { | 353 | { |
354 | mod_delayed_work(afs_callback_update_worker, &server->cb_break_work, 0); | 354 | cancel_delayed_work(&server->cb_break_work); |
355 | queue_delayed_work(afs_callback_update_worker, | ||
356 | &server->cb_break_work, 0); | ||
355 | } | 357 | } |
356 | 358 | ||
357 | #if 0 | 359 | #if 0 |
diff --git a/fs/afs/dir.c b/fs/afs/dir.c index db477906ba4..1b0b1955001 100644 --- a/fs/afs/dir.c +++ b/fs/afs/dir.c | |||
@@ -20,17 +20,17 @@ | |||
20 | #include "internal.h" | 20 | #include "internal.h" |
21 | 21 | ||
22 | static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, | 22 | static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, |
23 | unsigned int flags); | 23 | struct nameidata *nd); |
24 | static int afs_dir_open(struct inode *inode, struct file *file); | 24 | static int afs_dir_open(struct inode *inode, struct file *file); |
25 | static int afs_readdir(struct file *file, void *dirent, filldir_t filldir); | 25 | static int afs_readdir(struct file *file, void *dirent, filldir_t filldir); |
26 | static int afs_d_revalidate(struct dentry *dentry, unsigned int flags); | 26 | static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd); |
27 | static int afs_d_delete(const struct dentry *dentry); | 27 | static int afs_d_delete(const struct dentry *dentry); |
28 | static void afs_d_release(struct dentry *dentry); | 28 | static void afs_d_release(struct dentry *dentry); |
29 | static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, | 29 | static int afs_lookup_filldir(void *_cookie, const char *name, int nlen, |
30 | loff_t fpos, u64 ino, unsigned dtype); | 30 | loff_t fpos, u64 ino, unsigned dtype); |
31 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 31 | static int afs_create(struct inode *dir, struct dentry *dentry, int mode, |
32 | bool excl); | 32 | struct nameidata *nd); |
33 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode); | 33 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode); |
34 | static int afs_rmdir(struct inode *dir, struct dentry *dentry); | 34 | static int afs_rmdir(struct inode *dir, struct dentry *dentry); |
35 | static int afs_unlink(struct inode *dir, struct dentry *dentry); | 35 | static int afs_unlink(struct inode *dir, struct dentry *dentry); |
36 | static int afs_link(struct dentry *from, struct inode *dir, | 36 | static int afs_link(struct dentry *from, struct inode *dir, |
@@ -516,7 +516,7 @@ out: | |||
516 | * look up an entry in a directory | 516 | * look up an entry in a directory |
517 | */ | 517 | */ |
518 | static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, | 518 | static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry, |
519 | unsigned int flags) | 519 | struct nameidata *nd) |
520 | { | 520 | { |
521 | struct afs_vnode *vnode; | 521 | struct afs_vnode *vnode; |
522 | struct afs_fid fid; | 522 | struct afs_fid fid; |
@@ -598,7 +598,7 @@ success: | |||
598 | * - NOTE! the hit can be a negative hit too, so we can't assume we have an | 598 | * - NOTE! the hit can be a negative hit too, so we can't assume we have an |
599 | * inode | 599 | * inode |
600 | */ | 600 | */ |
601 | static int afs_d_revalidate(struct dentry *dentry, unsigned int flags) | 601 | static int afs_d_revalidate(struct dentry *dentry, struct nameidata *nd) |
602 | { | 602 | { |
603 | struct afs_vnode *vnode, *dir; | 603 | struct afs_vnode *vnode, *dir; |
604 | struct afs_fid uninitialized_var(fid); | 604 | struct afs_fid uninitialized_var(fid); |
@@ -607,7 +607,7 @@ static int afs_d_revalidate(struct dentry *dentry, unsigned int flags) | |||
607 | void *dir_version; | 607 | void *dir_version; |
608 | int ret; | 608 | int ret; |
609 | 609 | ||
610 | if (flags & LOOKUP_RCU) | 610 | if (nd->flags & LOOKUP_RCU) |
611 | return -ECHILD; | 611 | return -ECHILD; |
612 | 612 | ||
613 | vnode = AFS_FS_I(dentry->d_inode); | 613 | vnode = AFS_FS_I(dentry->d_inode); |
@@ -764,7 +764,7 @@ static void afs_d_release(struct dentry *dentry) | |||
764 | /* | 764 | /* |
765 | * create a directory on an AFS filesystem | 765 | * create a directory on an AFS filesystem |
766 | */ | 766 | */ |
767 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | 767 | static int afs_mkdir(struct inode *dir, struct dentry *dentry, int mode) |
768 | { | 768 | { |
769 | struct afs_file_status status; | 769 | struct afs_file_status status; |
770 | struct afs_callback cb; | 770 | struct afs_callback cb; |
@@ -777,7 +777,7 @@ static int afs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) | |||
777 | 777 | ||
778 | dvnode = AFS_FS_I(dir); | 778 | dvnode = AFS_FS_I(dir); |
779 | 779 | ||
780 | _enter("{%x:%u},{%s},%ho", | 780 | _enter("{%x:%u},{%s},%o", |
781 | dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); | 781 | dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); |
782 | 782 | ||
783 | ret = -ENAMETOOLONG; | 783 | ret = -ENAMETOOLONG; |
@@ -948,8 +948,8 @@ error: | |||
948 | /* | 948 | /* |
949 | * create a regular file on an AFS filesystem | 949 | * create a regular file on an AFS filesystem |
950 | */ | 950 | */ |
951 | static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | 951 | static int afs_create(struct inode *dir, struct dentry *dentry, int mode, |
952 | bool excl) | 952 | struct nameidata *nd) |
953 | { | 953 | { |
954 | struct afs_file_status status; | 954 | struct afs_file_status status; |
955 | struct afs_callback cb; | 955 | struct afs_callback cb; |
@@ -962,7 +962,7 @@ static int afs_create(struct inode *dir, struct dentry *dentry, umode_t mode, | |||
962 | 962 | ||
963 | dvnode = AFS_FS_I(dir); | 963 | dvnode = AFS_FS_I(dir); |
964 | 964 | ||
965 | _enter("{%x:%u},{%s},%ho,", | 965 | _enter("{%x:%u},{%s},%o,", |
966 | dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); | 966 | dvnode->fid.vid, dvnode->fid.vnode, dentry->d_name.name, mode); |
967 | 967 | ||
968 | ret = -ENAMETOOLONG; | 968 | ret = -ENAMETOOLONG; |
diff --git a/fs/afs/file.c b/fs/afs/file.c index 8f6e9234d56..14d89fa58fe 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c | |||
@@ -251,7 +251,7 @@ static int afs_readpages(struct file *file, struct address_space *mapping, | |||
251 | ASSERT(key != NULL); | 251 | ASSERT(key != NULL); |
252 | 252 | ||
253 | vnode = AFS_FS_I(mapping->host); | 253 | vnode = AFS_FS_I(mapping->host); |
254 | if (test_bit(AFS_VNODE_DELETED, &vnode->flags)) { | 254 | if (vnode->flags & AFS_VNODE_DELETED) { |
255 | _leave(" = -ESTALE"); | 255 | _leave(" = -ESTALE"); |
256 | return -ESTALE; | 256 | return -ESTALE; |
257 | } | 257 | } |
diff --git a/fs/afs/fsclient.c b/fs/afs/fsclient.c index b960ff05ea0..346e3289abd 100644 --- a/fs/afs/fsclient.c +++ b/fs/afs/fsclient.c | |||
@@ -90,7 +90,7 @@ static void xdr_decode_AFSFetchStatus(const __be32 **_bp, | |||
90 | vnode->vfs_inode.i_uid = status->owner; | 90 | vnode->vfs_inode.i_uid = status->owner; |
91 | vnode->vfs_inode.i_gid = status->group; | 91 | vnode->vfs_inode.i_gid = status->group; |
92 | vnode->vfs_inode.i_generation = vnode->fid.unique; | 92 | vnode->vfs_inode.i_generation = vnode->fid.unique; |
93 | set_nlink(&vnode->vfs_inode, status->nlink); | 93 | vnode->vfs_inode.i_nlink = status->nlink; |
94 | 94 | ||
95 | mode = vnode->vfs_inode.i_mode; | 95 | mode = vnode->vfs_inode.i_mode; |
96 | mode &= ~S_IALLUGO; | 96 | mode &= ~S_IALLUGO; |
@@ -365,10 +365,10 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call, | |||
365 | _debug("extract data"); | 365 | _debug("extract data"); |
366 | if (call->count > 0) { | 366 | if (call->count > 0) { |
367 | page = call->reply3; | 367 | page = call->reply3; |
368 | buffer = kmap_atomic(page); | 368 | buffer = kmap_atomic(page, KM_USER0); |
369 | ret = afs_extract_data(call, skb, last, buffer, | 369 | ret = afs_extract_data(call, skb, last, buffer, |
370 | call->count); | 370 | call->count); |
371 | kunmap_atomic(buffer); | 371 | kunmap_atomic(buffer, KM_USER0); |
372 | switch (ret) { | 372 | switch (ret) { |
373 | case 0: break; | 373 | case 0: break; |
374 | case -EAGAIN: return 0; | 374 | case -EAGAIN: return 0; |
@@ -411,9 +411,9 @@ static int afs_deliver_fs_fetch_data(struct afs_call *call, | |||
411 | if (call->count < PAGE_SIZE) { | 411 | if (call->count < PAGE_SIZE) { |
412 | _debug("clear"); | 412 | _debug("clear"); |
413 | page = call->reply3; | 413 | page = call->reply3; |
414 | buffer = kmap_atomic(page); | 414 | buffer = kmap_atomic(page, KM_USER0); |
415 | memset(buffer + call->count, 0, PAGE_SIZE - call->count); | 415 | memset(buffer + call->count, 0, PAGE_SIZE - call->count); |
416 | kunmap_atomic(buffer); | 416 | kunmap_atomic(buffer, KM_USER0); |
417 | } | 417 | } |
418 | 418 | ||
419 | _leave(" = 0 [done]"); | 419 | _leave(" = 0 [done]"); |
diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 95cffd38239..0fdab6e03d8 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c | |||
@@ -67,7 +67,7 @@ static int afs_inode_map_status(struct afs_vnode *vnode, struct key *key) | |||
67 | fscache_attr_changed(vnode->cache); | 67 | fscache_attr_changed(vnode->cache); |
68 | #endif | 68 | #endif |
69 | 69 | ||
70 | set_nlink(inode, vnode->status.nlink); | 70 | inode->i_nlink = vnode->status.nlink; |
71 | inode->i_uid = vnode->status.owner; | 71 | inode->i_uid = vnode->status.owner; |
72 | inode->i_gid = 0; | 72 | inode->i_gid = 0; |
73 | inode->i_size = vnode->status.size; | 73 | inode->i_size = vnode->status.size; |
@@ -174,7 +174,7 @@ struct inode *afs_iget_autocell(struct inode *dir, const char *dev_name, | |||
174 | inode->i_size = 0; | 174 | inode->i_size = 0; |
175 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; | 175 | inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO; |
176 | inode->i_op = &afs_autocell_inode_operations; | 176 | inode->i_op = &afs_autocell_inode_operations; |
177 | set_nlink(inode, 2); | 177 | inode->i_nlink = 2; |
178 | inode->i_uid = 0; | 178 | inode->i_uid = 0; |
179 | inode->i_gid = 0; | 179 | inode->i_gid = 0; |
180 | inode->i_ctime.tv_sec = get_seconds(); | 180 | inode->i_ctime.tv_sec = get_seconds(); |
@@ -423,7 +423,7 @@ void afs_evict_inode(struct inode *inode) | |||
423 | ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); | 423 | ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); |
424 | 424 | ||
425 | truncate_inode_pages(&inode->i_data, 0); | 425 | truncate_inode_pages(&inode->i_data, 0); |
426 | clear_inode(inode); | 426 | end_writeback(inode); |
427 | 427 | ||
428 | afs_give_up_callback(vnode); | 428 | afs_give_up_callback(vnode); |
429 | 429 | ||
diff --git a/fs/afs/internal.h b/fs/afs/internal.h index a306bb6d88d..d2b0888126d 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h | |||
@@ -109,7 +109,7 @@ struct afs_call { | |||
109 | unsigned reply_size; /* current size of reply */ | 109 | unsigned reply_size; /* current size of reply */ |
110 | unsigned first_offset; /* offset into mapping[first] */ | 110 | unsigned first_offset; /* offset into mapping[first] */ |
111 | unsigned last_to; /* amount of mapping[last] */ | 111 | unsigned last_to; /* amount of mapping[last] */ |
112 | unsigned offset; /* offset into received data store */ | 112 | unsigned short offset; /* offset into received data store */ |
113 | unsigned char unmarshall; /* unmarshalling phase */ | 113 | unsigned char unmarshall; /* unmarshalling phase */ |
114 | bool incoming; /* T if incoming call */ | 114 | bool incoming; /* T if incoming call */ |
115 | bool send_pages; /* T if data from mapping should be sent */ | 115 | bool send_pages; /* T if data from mapping should be sent */ |
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 9682c33d5da..aa59184151d 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -22,7 +22,7 @@ | |||
22 | 22 | ||
23 | static struct dentry *afs_mntpt_lookup(struct inode *dir, | 23 | static struct dentry *afs_mntpt_lookup(struct inode *dir, |
24 | struct dentry *dentry, | 24 | struct dentry *dentry, |
25 | unsigned int flags); | 25 | struct nameidata *nd); |
26 | static int afs_mntpt_open(struct inode *inode, struct file *file); | 26 | static int afs_mntpt_open(struct inode *inode, struct file *file); |
27 | static void afs_mntpt_expiry_timed_out(struct work_struct *work); | 27 | static void afs_mntpt_expiry_timed_out(struct work_struct *work); |
28 | 28 | ||
@@ -104,7 +104,7 @@ out: | |||
104 | */ | 104 | */ |
105 | static struct dentry *afs_mntpt_lookup(struct inode *dir, | 105 | static struct dentry *afs_mntpt_lookup(struct inode *dir, |
106 | struct dentry *dentry, | 106 | struct dentry *dentry, |
107 | unsigned int flags) | 107 | struct nameidata *nd) |
108 | { | 108 | { |
109 | _enter("%p,%p{%p{%s},%s}", | 109 | _enter("%p,%p{%p{%s},%s}", |
110 | dir, | 110 | dir, |
@@ -200,9 +200,9 @@ static struct vfsmount *afs_mntpt_do_automount(struct dentry *mntpt) | |||
200 | if (PageError(page)) | 200 | if (PageError(page)) |
201 | goto error; | 201 | goto error; |
202 | 202 | ||
203 | buf = kmap_atomic(page); | 203 | buf = kmap_atomic(page, KM_USER0); |
204 | memcpy(devname, buf, size); | 204 | memcpy(devname, buf, size); |
205 | kunmap_atomic(buf); | 205 | kunmap_atomic(buf, KM_USER0); |
206 | page_cache_release(page); | 206 | page_cache_release(page); |
207 | page = NULL; | 207 | page = NULL; |
208 | } | 208 | } |
@@ -242,7 +242,7 @@ struct vfsmount *afs_d_automount(struct path *path) | |||
242 | { | 242 | { |
243 | struct vfsmount *newmnt; | 243 | struct vfsmount *newmnt; |
244 | 244 | ||
245 | _enter("{%s}", path->dentry->d_name.name); | 245 | _enter("{%s,%s}", path->mnt->mnt_devname, path->dentry->d_name.name); |
246 | 246 | ||
247 | newmnt = afs_mntpt_do_automount(path->dentry); | 247 | newmnt = afs_mntpt_do_automount(path->dentry); |
248 | if (IS_ERR(newmnt)) | 248 | if (IS_ERR(newmnt)) |
@@ -252,7 +252,7 @@ struct vfsmount *afs_d_automount(struct path *path) | |||
252 | mnt_set_expiry(newmnt, &afs_vfsmounts); | 252 | mnt_set_expiry(newmnt, &afs_vfsmounts); |
253 | queue_delayed_work(afs_wq, &afs_mntpt_expiry_timer, | 253 | queue_delayed_work(afs_wq, &afs_mntpt_expiry_timer, |
254 | afs_mntpt_expiry_timeout * HZ); | 254 | afs_mntpt_expiry_timeout * HZ); |
255 | _leave(" = %p", newmnt); | 255 | _leave(" = %p {%s}", newmnt, newmnt->mnt_devname); |
256 | return newmnt; | 256 | return newmnt; |
257 | } | 257 | } |
258 | 258 | ||
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 8ad8c2a0703..e45a323aebb 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c | |||
@@ -314,7 +314,6 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp, | |||
314 | struct msghdr msg; | 314 | struct msghdr msg; |
315 | struct kvec iov[1]; | 315 | struct kvec iov[1]; |
316 | int ret; | 316 | int ret; |
317 | struct sk_buff *skb; | ||
318 | 317 | ||
319 | _enter("%x,{%d},", addr->s_addr, ntohs(call->port)); | 318 | _enter("%x,{%d},", addr->s_addr, ntohs(call->port)); |
320 | 319 | ||
@@ -381,8 +380,6 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp, | |||
381 | 380 | ||
382 | error_do_abort: | 381 | error_do_abort: |
383 | rxrpc_kernel_abort_call(rxcall, RX_USER_ABORT); | 382 | rxrpc_kernel_abort_call(rxcall, RX_USER_ABORT); |
384 | while ((skb = skb_dequeue(&call->rx_queue))) | ||
385 | afs_free_skb(skb); | ||
386 | rxrpc_kernel_end_call(rxcall); | 383 | rxrpc_kernel_end_call(rxcall); |
387 | call->rxcall = NULL; | 384 | call->rxcall = NULL; |
388 | error_kill_call: | 385 | error_kill_call: |
diff --git a/fs/afs/server.c b/fs/afs/server.c index f342acf3547..d59b7516e94 100644 --- a/fs/afs/server.c +++ b/fs/afs/server.c | |||
@@ -285,7 +285,12 @@ static void afs_reap_server(struct work_struct *work) | |||
285 | expiry = server->time_of_death + afs_server_timeout; | 285 | expiry = server->time_of_death + afs_server_timeout; |
286 | if (expiry > now) { | 286 | if (expiry > now) { |
287 | delay = (expiry - now) * HZ; | 287 | delay = (expiry - now) * HZ; |
288 | mod_delayed_work(afs_wq, &afs_server_reaper, delay); | 288 | if (!queue_delayed_work(afs_wq, &afs_server_reaper, |
289 | delay)) { | ||
290 | cancel_delayed_work(&afs_server_reaper); | ||
291 | queue_delayed_work(afs_wq, &afs_server_reaper, | ||
292 | delay); | ||
293 | } | ||
289 | break; | 294 | break; |
290 | } | 295 | } |
291 | 296 | ||
@@ -318,5 +323,6 @@ static void afs_reap_server(struct work_struct *work) | |||
318 | void __exit afs_purge_servers(void) | 323 | void __exit afs_purge_servers(void) |
319 | { | 324 | { |
320 | afs_server_timeout = 0; | 325 | afs_server_timeout = 0; |
321 | mod_delayed_work(afs_wq, &afs_server_reaper, 0); | 326 | cancel_delayed_work(&afs_server_reaper); |
327 | queue_delayed_work(afs_wq, &afs_server_reaper, 0); | ||
322 | } | 328 | } |
diff --git a/fs/afs/super.c b/fs/afs/super.c index 43165009428..356dcf0929e 100644 --- a/fs/afs/super.c +++ b/fs/afs/super.c | |||
@@ -123,11 +123,6 @@ void __exit afs_fs_exit(void) | |||
123 | BUG(); | 123 | BUG(); |
124 | } | 124 | } |
125 | 125 | ||
126 | /* | ||
127 | * Make sure all delayed rcu free inodes are flushed before we | ||
128 | * destroy cache. | ||
129 | */ | ||
130 | rcu_barrier(); | ||
131 | kmem_cache_destroy(afs_inode_cachep); | 126 | kmem_cache_destroy(afs_inode_cachep); |
132 | _leave(""); | 127 | _leave(""); |
133 | } | 128 | } |
@@ -306,6 +301,7 @@ static int afs_fill_super(struct super_block *sb, | |||
306 | { | 301 | { |
307 | struct afs_super_info *as = sb->s_fs_info; | 302 | struct afs_super_info *as = sb->s_fs_info; |
308 | struct afs_fid fid; | 303 | struct afs_fid fid; |
304 | struct dentry *root = NULL; | ||
309 | struct inode *inode = NULL; | 305 | struct inode *inode = NULL; |
310 | int ret; | 306 | int ret; |
311 | 307 | ||
@@ -331,16 +327,18 @@ static int afs_fill_super(struct super_block *sb, | |||
331 | set_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(inode)->flags); | 327 | set_bit(AFS_VNODE_AUTOCELL, &AFS_FS_I(inode)->flags); |
332 | 328 | ||
333 | ret = -ENOMEM; | 329 | ret = -ENOMEM; |
334 | sb->s_root = d_make_root(inode); | 330 | root = d_alloc_root(inode); |
335 | if (!sb->s_root) | 331 | if (!root) |
336 | goto error; | 332 | goto error; |
337 | 333 | ||
338 | sb->s_d_op = &afs_fs_dentry_operations; | 334 | sb->s_d_op = &afs_fs_dentry_operations; |
335 | sb->s_root = root; | ||
339 | 336 | ||
340 | _leave(" = 0"); | 337 | _leave(" = 0"); |
341 | return 0; | 338 | return 0; |
342 | 339 | ||
343 | error: | 340 | error: |
341 | iput(inode); | ||
344 | _leave(" = %d", ret); | 342 | _leave(" = %d", ret); |
345 | return ret; | 343 | return ret; |
346 | } | 344 | } |
@@ -400,7 +398,7 @@ static struct dentry *afs_mount(struct file_system_type *fs_type, | |||
400 | as->volume = vol; | 398 | as->volume = vol; |
401 | 399 | ||
402 | /* allocate a deviceless superblock */ | 400 | /* allocate a deviceless superblock */ |
403 | sb = sget(fs_type, afs_test_super, afs_set_super, flags, as); | 401 | sb = sget(fs_type, afs_test_super, afs_set_super, as); |
404 | if (IS_ERR(sb)) { | 402 | if (IS_ERR(sb)) { |
405 | ret = PTR_ERR(sb); | 403 | ret = PTR_ERR(sb); |
406 | afs_put_volume(vol); | 404 | afs_put_volume(vol); |
@@ -411,6 +409,7 @@ static struct dentry *afs_mount(struct file_system_type *fs_type, | |||
411 | if (!sb->s_root) { | 409 | if (!sb->s_root) { |
412 | /* initial superblock/root creation */ | 410 | /* initial superblock/root creation */ |
413 | _debug("create"); | 411 | _debug("create"); |
412 | sb->s_flags = flags; | ||
414 | ret = afs_fill_super(sb, ¶ms); | 413 | ret = afs_fill_super(sb, ¶ms); |
415 | if (ret < 0) { | 414 | if (ret < 0) { |
416 | deactivate_locked_super(sb); | 415 | deactivate_locked_super(sb); |
@@ -496,6 +495,7 @@ static void afs_i_callback(struct rcu_head *head) | |||
496 | { | 495 | { |
497 | struct inode *inode = container_of(head, struct inode, i_rcu); | 496 | struct inode *inode = container_of(head, struct inode, i_rcu); |
498 | struct afs_vnode *vnode = AFS_FS_I(inode); | 497 | struct afs_vnode *vnode = AFS_FS_I(inode); |
498 | INIT_LIST_HEAD(&inode->i_dentry); | ||
499 | kmem_cache_free(afs_inode_cachep, vnode); | 499 | kmem_cache_free(afs_inode_cachep, vnode); |
500 | } | 500 | } |
501 | 501 | ||
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 57bcb159653..431984d2e37 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c | |||
@@ -561,7 +561,12 @@ static void afs_vlocation_reaper(struct work_struct *work) | |||
561 | if (expiry > now) { | 561 | if (expiry > now) { |
562 | delay = (expiry - now) * HZ; | 562 | delay = (expiry - now) * HZ; |
563 | _debug("delay %lu", delay); | 563 | _debug("delay %lu", delay); |
564 | mod_delayed_work(afs_wq, &afs_vlocation_reap, delay); | 564 | if (!queue_delayed_work(afs_wq, &afs_vlocation_reap, |
565 | delay)) { | ||
566 | cancel_delayed_work(&afs_vlocation_reap); | ||
567 | queue_delayed_work(afs_wq, &afs_vlocation_reap, | ||
568 | delay); | ||
569 | } | ||
565 | break; | 570 | break; |
566 | } | 571 | } |
567 | 572 | ||
@@ -609,10 +614,13 @@ void afs_vlocation_purge(void) | |||
609 | spin_lock(&afs_vlocation_updates_lock); | 614 | spin_lock(&afs_vlocation_updates_lock); |
610 | list_del_init(&afs_vlocation_updates); | 615 | list_del_init(&afs_vlocation_updates); |
611 | spin_unlock(&afs_vlocation_updates_lock); | 616 | spin_unlock(&afs_vlocation_updates_lock); |
612 | mod_delayed_work(afs_vlocation_update_worker, &afs_vlocation_update, 0); | 617 | cancel_delayed_work(&afs_vlocation_update); |
618 | queue_delayed_work(afs_vlocation_update_worker, | ||
619 | &afs_vlocation_update, 0); | ||
613 | destroy_workqueue(afs_vlocation_update_worker); | 620 | destroy_workqueue(afs_vlocation_update_worker); |
614 | 621 | ||
615 | mod_delayed_work(afs_wq, &afs_vlocation_reap, 0); | 622 | cancel_delayed_work(&afs_vlocation_reap); |
623 | queue_delayed_work(afs_wq, &afs_vlocation_reap, 0); | ||
616 | } | 624 | } |
617 | 625 | ||
618 | /* | 626 | /* |