Skip to content

Commit

Permalink
fs/afs/: possible cleanups
Browse files Browse the repository at this point in the history
This patch contains the following possible cleanups:
- make the following needlessly global functions static:
  - rxrpc.c: afs_send_pages()
  - vlocation.c: afs_vlocation_queue_for_updates()
  - write.c: afs_writepages_region()
- make the following needlessly global variables static:
  - mntpt.c: afs_mntpt_expiry_timeout
  - proc.c: afs_vlocation_states[]
  - server.c: afs_server_timeout
  - vlocation.c: afs_vlocation_timeout
  - vlocation.c: afs_vlocation_update_timeout
- #if 0 the following unused function:
  - cell.c: afs_get_cell_maybe()
- #if 0 the following unused variables:
  - callback.c: afs_vnode_update_timeout
  - cmservice.c: struct afs_cm_workqueue

Signed-off-by: Adrian Bunk <[email protected]>
Acked-by: David Howells <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Oct 17, 2007
1 parent a4d63e7 commit c1206a2
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 11 deletions.
2 changes: 2 additions & 0 deletions fs/afs/callback.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@
#include <linux/sched.h>
#include "internal.h"

#if 0
unsigned afs_vnode_update_timeout = 10;
#endif /* 0 */

#define afs_breakring_space(server) \
CIRC_SPACE((server)->cb_break_head, (server)->cb_break_tail, \
Expand Down
2 changes: 2 additions & 0 deletions fs/afs/cell.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ struct afs_cell *afs_cell_lookup(const char *name, unsigned namesz)
return cell;
}

#if 0
/*
* try and get a cell record
*/
Expand All @@ -280,6 +281,7 @@ struct afs_cell *afs_get_cell_maybe(struct afs_cell *cell)
write_unlock(&afs_cells_lock);
return cell;
}
#endif /* 0 */

/*
* destroy a cell record
Expand Down
2 changes: 2 additions & 0 deletions fs/afs/cmservice.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@
#include "internal.h"
#include "afs_cm.h"

#if 0
struct workqueue_struct *afs_cm_workqueue;
#endif /* 0 */

static int afs_deliver_cb_init_call_back_state(struct afs_call *,
struct sk_buff *, bool);
Expand Down
1 change: 0 additions & 1 deletion fs/afs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,6 @@ extern int afs_abort_to_error(u32);
*/
extern const struct inode_operations afs_mntpt_inode_operations;
extern const struct file_operations afs_mntpt_file_operations;
extern unsigned long afs_mntpt_expiry_timeout;

extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);
extern void afs_mntpt_kill_timer(void);
Expand Down
2 changes: 1 addition & 1 deletion fs/afs/mntpt.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const struct inode_operations afs_mntpt_inode_operations = {
static LIST_HEAD(afs_vfsmounts);
static DECLARE_DELAYED_WORK(afs_mntpt_expiry_timer, afs_mntpt_expiry_timed_out);

unsigned long afs_mntpt_expiry_timeout = 10 * 60;
static unsigned long afs_mntpt_expiry_timeout = 10 * 60;

/*
* check a symbolic link to see whether it actually encodes a mountpoint
Expand Down
2 changes: 1 addition & 1 deletion fs/afs/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ static void afs_proc_cell_volumes_stop(struct seq_file *p, void *v)
up_read(&cell->vl_sem);
}

const char afs_vlocation_states[][4] = {
static const char afs_vlocation_states[][4] = {
[AFS_VL_NEW] = "New",
[AFS_VL_CREATING] = "Crt",
[AFS_VL_VALID] = "Val",
Expand Down
3 changes: 2 additions & 1 deletion fs/afs/rxrpc.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ void afs_flat_call_destructor(struct afs_call *call)
/*
* attach the data from a bunch of pages on an inode to a call
*/
int afs_send_pages(struct afs_call *call, struct msghdr *msg, struct kvec *iov)
static int afs_send_pages(struct afs_call *call, struct msghdr *msg,
struct kvec *iov)
{
struct page *pages[8];
unsigned count, n, loop, offset, to;
Expand Down
2 changes: 1 addition & 1 deletion fs/afs/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include <linux/slab.h>
#include "internal.h"

unsigned afs_server_timeout = 10; /* server timeout in seconds */
static unsigned afs_server_timeout = 10; /* server timeout in seconds */

static void afs_reap_server(struct work_struct *);

Expand Down
6 changes: 3 additions & 3 deletions fs/afs/vlocation.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include <linux/sched.h>
#include "internal.h"

unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */
unsigned afs_vlocation_update_timeout = 10 * 60;
static unsigned afs_vlocation_timeout = 10; /* volume location timeout in seconds */
static unsigned afs_vlocation_update_timeout = 10 * 60;

static void afs_vlocation_reaper(struct work_struct *);
static void afs_vlocation_updater(struct work_struct *);
Expand Down Expand Up @@ -335,7 +335,7 @@ static int afs_vlocation_fill_in_record(struct afs_vlocation *vl,
/*
* queue a vlocation record for updates
*/
void afs_vlocation_queue_for_updates(struct afs_vlocation *vl)
static void afs_vlocation_queue_for_updates(struct afs_vlocation *vl)
{
struct afs_vlocation *xvl;

Expand Down
6 changes: 3 additions & 3 deletions fs/afs/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,9 +510,9 @@ int afs_writepage(struct page *page, struct writeback_control *wbc)
/*
* write a region of pages back to the server
*/
int afs_writepages_region(struct address_space *mapping,
struct writeback_control *wbc,
pgoff_t index, pgoff_t end, pgoff_t *_next)
static int afs_writepages_region(struct address_space *mapping,
struct writeback_control *wbc,
pgoff_t index, pgoff_t end, pgoff_t *_next)
{
struct backing_dev_info *bdi = mapping->backing_dev_info;
struct afs_writeback *wb;
Expand Down

0 comments on commit c1206a2

Please sign in to comment.