aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs')
-rw-r--r--fs/afs/callback.c2
-rw-r--r--fs/afs/cell.c19
-rw-r--r--fs/afs/cmservice.c2
-rw-r--r--fs/afs/flock.c3
-rw-r--r--fs/afs/internal.h1
-rw-r--r--fs/afs/mntpt.c2
-rw-r--r--fs/afs/proc.c2
-rw-r--r--fs/afs/rxrpc.c3
-rw-r--r--fs/afs/server.c2
-rw-r--r--fs/afs/super.c6
-rw-r--r--fs/afs/vlocation.c6
-rw-r--r--fs/afs/write.c8
12 files changed, 27 insertions, 29 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c
index b824394581..a78d5b236b 100644
--- a/fs/afs/callback.c
+++ b/fs/afs/callback.c
@@ -20,7 +20,9 @@
20#include <linux/sched.h> 20#include <linux/sched.h>
21#include "internal.h" 21#include "internal.h"
22 22
23#if 0
23unsigned afs_vnode_update_timeout = 10; 24unsigned afs_vnode_update_timeout = 10;
25#endif /* 0 */
24 26
25#define afs_breakring_space(server) \ 27#define afs_breakring_space(server) \
26 CIRC_SPACE((server)->cb_break_head, (server)->cb_break_tail, \ 28 CIRC_SPACE((server)->cb_break_head, (server)->cb_break_tail, \
diff --git a/fs/afs/cell.c b/fs/afs/cell.c
index 175a567db7..970d38f305 100644
--- a/fs/afs/cell.c
+++ b/fs/afs/cell.c
@@ -33,6 +33,7 @@ static struct afs_cell *afs_cell_root;
33static struct afs_cell *afs_cell_alloc(const char *name, char *vllist) 33static struct afs_cell *afs_cell_alloc(const char *name, char *vllist)
34{ 34{
35 struct afs_cell *cell; 35 struct afs_cell *cell;
36 struct key *key;
36 size_t namelen; 37 size_t namelen;
37 char keyname[4 + AFS_MAXCELLNAME + 1], *cp, *dp, *next; 38 char keyname[4 + AFS_MAXCELLNAME + 1], *cp, *dp, *next;
38 int ret; 39 int ret;
@@ -89,20 +90,14 @@ static struct afs_cell *afs_cell_alloc(const char *name, char *vllist)
89 do { 90 do {
90 *dp++ = toupper(*cp); 91 *dp++ = toupper(*cp);
91 } while (*cp++); 92 } while (*cp++);
92 cell->anonymous_key = key_alloc(&key_type_rxrpc, keyname, 0, 0, current,
93 KEY_POS_SEARCH, KEY_ALLOC_NOT_IN_QUOTA);
94 if (IS_ERR(cell->anonymous_key)) {
95 _debug("no key");
96 ret = PTR_ERR(cell->anonymous_key);
97 goto error;
98 }
99 93
100 ret = key_instantiate_and_link(cell->anonymous_key, NULL, 0, 94 key = rxrpc_get_null_key(keyname);
101 NULL, NULL); 95 if (IS_ERR(key)) {
102 if (ret < 0) { 96 _debug("no key");
103 _debug("instantiate failed"); 97 ret = PTR_ERR(key);
104 goto error; 98 goto error;
105 } 99 }
100 cell->anonymous_key = key;
106 101
107 _debug("anon key %p{%x}", 102 _debug("anon key %p{%x}",
108 cell->anonymous_key, key_serial(cell->anonymous_key)); 103 cell->anonymous_key, key_serial(cell->anonymous_key));
@@ -265,6 +260,7 @@ struct afs_cell *afs_cell_lookup(const char *name, unsigned namesz)
265 return cell; 260 return cell;
266} 261}
267 262
263#if 0
268/* 264/*
269 * try and get a cell record 265 * try and get a cell record
270 */ 266 */
@@ -280,6 +276,7 @@ struct afs_cell *afs_get_cell_maybe(struct afs_cell *cell)
280 write_unlock(&afs_cells_lock); 276 write_unlock(&afs_cells_lock);
281 return cell; 277 return cell;
282} 278}
279#endif /* 0 */
283 280
284/* 281/*
285 * destroy a cell record 282 * destroy a cell record
diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c
index d5b2ad6575..47b71c8947 100644
--- a/fs/afs/cmservice.c
+++ b/fs/afs/cmservice.c
@@ -16,7 +16,9 @@
16#include "internal.h" 16#include "internal.h"
17#include "afs_cm.h" 17#include "afs_cm.h"
18 18
19#if 0
19struct workqueue_struct *afs_cm_workqueue; 20struct workqueue_struct *afs_cm_workqueue;
21#endif /* 0 */
20 22
21static int afs_deliver_cb_init_call_back_state(struct afs_call *, 23static int afs_deliver_cb_init_call_back_state(struct afs_call *,
22 struct sk_buff *, bool); 24 struct sk_buff *, bool);
diff --git a/fs/afs/flock.c b/fs/afs/flock.c
index af6952e39a..210acafe4a 100644
--- a/fs/afs/flock.c
+++ b/fs/afs/flock.c
@@ -524,8 +524,7 @@ int afs_lock(struct file *file, int cmd, struct file_lock *fl)
524 (long long) fl->fl_start, (long long) fl->fl_end); 524 (long long) fl->fl_start, (long long) fl->fl_end);
525 525
526 /* AFS doesn't support mandatory locks */ 526 /* AFS doesn't support mandatory locks */
527 if ((vnode->vfs_inode.i_mode & (S_ISGID | S_IXGRP)) == S_ISGID && 527 if (__mandatory_lock(&vnode->vfs_inode) && fl->fl_type != F_UNLCK)
528 fl->fl_type != F_UNLCK)
529 return -ENOLCK; 528 return -ENOLCK;
530 529
531 if (IS_GETLK(cmd)) 530 if (IS_GETLK(cmd))
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 6306438f33..5ca3625cd3 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -570,7 +570,6 @@ extern int afs_abort_to_error(u32);
570 */ 570 */
571extern const struct inode_operations afs_mntpt_inode_operations; 571extern const struct inode_operations afs_mntpt_inode_operations;
572extern const struct file_operations afs_mntpt_file_operations; 572extern const struct file_operations afs_mntpt_file_operations;
573extern unsigned long afs_mntpt_expiry_timeout;
574 573
575extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *); 574extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);
576extern void afs_mntpt_kill_timer(void); 575extern void afs_mntpt_kill_timer(void);
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c
index 6f8c96fb29..5ce43b63c6 100644
--- a/fs/afs/mntpt.c
+++ b/fs/afs/mntpt.c
@@ -42,7 +42,7 @@ const struct inode_operations afs_mntpt_inode_operations = {
42static LIST_HEAD(afs_vfsmounts); 42static LIST_HEAD(afs_vfsmounts);
43static DECLARE_DELAYED_WORK(afs_mntpt_expiry_timer, afs_mntpt_expiry_timed_out); 43static DECLARE_DELAYED_WORK(afs_mntpt_expiry_timer, afs_mntpt_expiry_timed_out);
44 44
45unsigned long afs_mntpt_expiry_timeout = 10 * 60; 45static unsigned long afs_mntpt_expiry_timeout = 10 * 60;
46 46
47/* 47/*
48 * check a symbolic link to see whether it actually encodes a mountpoint 48 * check a symbolic link to see whether it actually encodes a mountpoint
diff --git a/fs/afs/proc.c b/fs/afs/proc.c
index 6edb56683b..846c7615ac 100644
--- a/fs/afs/proc.c
+++ b/fs/afs/proc.c
@@ -513,7 +513,7 @@ static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v)
513 up_read(&cell->vl_sem); 513 up_read(&cell->vl_sem);
514} 514}
515 515
516const char afs_vlocation_states[][4] = { 516static const char afs_vlocation_states[][4] = {
517 [AFS_VL_NEW] = "New", 517 [AFS_VL_NEW] = "New",
518 [AFS_VL_CREATING] = "Crt", 518 [AFS_VL_CREATING] = "Crt",
519 [AFS_VL_VALID] = "Val", 519 [AFS_VL_VALID] = "Val",
diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c
index 8ccee9ee1d..bde3f19c09 100644
--- a/fs/afs/rxrpc.c
+++ b/fs/afs/rxrpc.c
@@ -239,7 +239,8 @@ void afs_flat_call_destructor(struct afs_call *call)
239/* 239/*
240 * attach the data from a bunch of pages on an inode to a call 240 * attach the data from a bunch of pages on an inode to a call
241 */ 241 */
242int afs_send_pages(struct afs_call *call, struct msghdr *msg, struct kvec *iov) 242static int afs_send_pages(struct afs_call *call, struct msghdr *msg,
243 struct kvec *iov)
243{ 244{
244 struct page *pages[8]; 245 struct page *pages[8];
245 unsigned count, n, loop, offset, to; 246 unsigned count, n, loop, offset, to;
diff --git a/fs/afs/server.c b/fs/afs/server.c
index 231ae41502..28f2451419 100644
--- a/fs/afs/server.c
+++ b/fs/afs/server.c
@@ -13,7 +13,7 @@
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include "internal.h" 14#include "internal.h"
15 15
16unsigned afs_server_timeout = 10; /* server timeout in seconds */ 16static unsigned afs_server_timeout = 10; /* server timeout in seconds */
17 17
18static void afs_reap_server(struct work_struct *); 18static void afs_reap_server(struct work_struct *);
19 19
diff --git a/fs/afs/super.c b/fs/afs/super.c
index b8808b40f8..4b2558c422 100644
--- a/fs/afs/super.c
+++ b/fs/afs/super.c
@@ -27,8 +27,7 @@
27 27
28#define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */ 28#define AFS_FS_MAGIC 0x6B414653 /* 'kAFS' */
29 29
30static void afs_i_init_once(void *foo, struct kmem_cache *cachep, 30static void afs_i_init_once(struct kmem_cache *cachep, void *foo);
31 unsigned long flags);
32static int afs_get_sb(struct file_system_type *fs_type, 31static int afs_get_sb(struct file_system_type *fs_type,
33 int flags, const char *dev_name, 32 int flags, const char *dev_name,
34 void *data, struct vfsmount *mnt); 33 void *data, struct vfsmount *mnt);
@@ -446,8 +445,7 @@ static void afs_put_super(struct super_block *sb)
446/* 445/*
447 * initialise an inode cache slab element prior to any use 446 * initialise an inode cache slab element prior to any use
448 */ 447 */
449static void afs_i_init_once(void *_vnode, struct kmem_cache *cachep, 448static void afs_i_init_once(struct kmem_cache *cachep, void *_vnode)
450 unsigned long flags)
451{ 449{
452 struct afs_vnode *vnode = _vnode; 450 struct afs_vnode *vnode = _vnode;
453 451
diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c
index 09e3ad0fc7..7b4bbe4811 100644
--- a/fs/afs/vlocation.c
+++ b/fs/afs/vlocation.c
@@ -15,8 +15,8 @@
15#include <linux/sched.h> 15#include <linux/sched.h>
16#include "internal.h" 16#include "internal.h"
17 17
18unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */ 18static unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */
19unsigned afs_vlocation_update_timeout = 10 * 60; 19static unsigned afs_vlocation_update_timeout = 10 * 60;
20 20
21static void afs_vlocation_reaper(struct work_struct *); 21static void afs_vlocation_reaper(struct work_struct *);
22static void afs_vlocation_updater(struct work_struct *); 22static void afs_vlocation_updater(struct work_struct *);
@@ -335,7 +335,7 @@ static int afs_vlocation_fill_in_record(struct afs_vlocation *vl,
335/* 335/*
336 * queue a vlocation record for updates 336 * queue a vlocation record for updates
337 */ 337 */
338void afs_vlocation_queue_for_updates(struct afs_vlocation *vl) 338static void afs_vlocation_queue_for_updates(struct afs_vlocation *vl)
339{ 339{
340 struct afs_vlocation *xvl; 340 struct afs_vlocation *xvl;
341 341
diff --git a/fs/afs/write.c b/fs/afs/write.c
index a03b92a0fe..9a849ad3c4 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -8,7 +8,7 @@
8 * as published by the Free Software Foundation; either version 8 * as published by the Free Software Foundation; either version
9 * 2 of the License, or (at your option) any later version. 9 * 2 of the License, or (at your option) any later version.
10 */ 10 */
11 11#include <linux/backing-dev.h>
12#include <linux/slab.h> 12#include <linux/slab.h>
13#include <linux/fs.h> 13#include <linux/fs.h>
14#include <linux/pagemap.h> 14#include <linux/pagemap.h>
@@ -510,9 +510,9 @@ int afs_writepage(struct page *page, struct writeback_control *wbc)
510/* 510/*
511 * write a region of pages back to the server 511 * write a region of pages back to the server
512 */ 512 */
513int afs_writepages_region(struct address_space *mapping, 513static int afs_writepages_region(struct address_space *mapping,
514 struct writeback_control *wbc, 514 struct writeback_control *wbc,
515 pgoff_t index, pgoff_t end, pgoff_t *_next) 515 pgoff_t index, pgoff_t end, pgoff_t *_next)
516{ 516{
517 struct backing_dev_info *bdi = mapping->backing_dev_info; 517 struct backing_dev_info *bdi = mapping->backing_dev_info;
518 struct afs_writeback *wb; 518 struct afs_writeback *wb;