Skip to content

Commit

Permalink
fs/ocfs2/ioctl.c: add static to local functions
Browse files Browse the repository at this point in the history
ocfs_info_foo() and ocfs2_get_request_ptr functions are only used in ioctl.c

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Fabian Frederick authored and Linus Torvalds committed Jun 4, 2014
1 parent 6718cb5 commit c253ed1
Showing 1 changed file with 41 additions and 40 deletions.
81 changes: 41 additions & 40 deletions fs/ocfs2/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,
return status;
}

int ocfs2_info_handle_blocksize(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_blocksize(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_blocksize oib;
Expand All @@ -167,8 +167,8 @@ int ocfs2_info_handle_blocksize(struct inode *inode,
return status;
}

int ocfs2_info_handle_clustersize(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_clustersize(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_clustersize oic;
Expand All @@ -192,8 +192,8 @@ int ocfs2_info_handle_clustersize(struct inode *inode,
return status;
}

int ocfs2_info_handle_maxslots(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_maxslots(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_maxslots oim;
Expand All @@ -217,8 +217,8 @@ int ocfs2_info_handle_maxslots(struct inode *inode,
return status;
}

int ocfs2_info_handle_label(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_label(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_label oil;
Expand All @@ -242,8 +242,8 @@ int ocfs2_info_handle_label(struct inode *inode,
return status;
}

int ocfs2_info_handle_uuid(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_uuid(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_uuid oiu;
Expand All @@ -267,8 +267,8 @@ int ocfs2_info_handle_uuid(struct inode *inode,
return status;
}

int ocfs2_info_handle_fs_features(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_fs_features(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_fs_features oif;
Expand All @@ -294,8 +294,8 @@ int ocfs2_info_handle_fs_features(struct inode *inode,
return status;
}

int ocfs2_info_handle_journal_size(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_journal_size(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_journal_size oij;
Expand All @@ -319,9 +319,10 @@ int ocfs2_info_handle_journal_size(struct inode *inode,
return status;
}

int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb,
struct inode *inode_alloc, u64 blkno,
struct ocfs2_info_freeinode *fi, u32 slot)
static int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb,
struct inode *inode_alloc, u64 blkno,
struct ocfs2_info_freeinode *fi,
u32 slot)
{
int status = 0, unlock = 0;

Expand Down Expand Up @@ -366,8 +367,8 @@ int ocfs2_info_scan_inode_alloc(struct ocfs2_super *osb,
return status;
}

int ocfs2_info_handle_freeinode(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_freeinode(struct inode *inode,
struct ocfs2_info_request __user *req)
{
u32 i;
u64 blkno = -1;
Expand Down Expand Up @@ -462,19 +463,19 @@ static void o2ffg_update_stats(struct ocfs2_info_freefrag_stats *stats,
stats->ffs_free_chunks_real++;
}

void ocfs2_info_update_ffg(struct ocfs2_info_freefrag *ffg,
unsigned int chunksize)
static void ocfs2_info_update_ffg(struct ocfs2_info_freefrag *ffg,
unsigned int chunksize)
{
o2ffg_update_histogram(&(ffg->iff_ffs.ffs_fc_hist), chunksize);
o2ffg_update_stats(&(ffg->iff_ffs), chunksize);
}

int ocfs2_info_freefrag_scan_chain(struct ocfs2_super *osb,
struct inode *gb_inode,
struct ocfs2_dinode *gb_dinode,
struct ocfs2_chain_rec *rec,
struct ocfs2_info_freefrag *ffg,
u32 chunks_in_group)
static int ocfs2_info_freefrag_scan_chain(struct ocfs2_super *osb,
struct inode *gb_inode,
struct ocfs2_dinode *gb_dinode,
struct ocfs2_chain_rec *rec,
struct ocfs2_info_freefrag *ffg,
u32 chunks_in_group)
{
int status = 0, used;
u64 blkno;
Expand Down Expand Up @@ -572,9 +573,9 @@ int ocfs2_info_freefrag_scan_chain(struct ocfs2_super *osb,
return status;
}

int ocfs2_info_freefrag_scan_bitmap(struct ocfs2_super *osb,
struct inode *gb_inode, u64 blkno,
struct ocfs2_info_freefrag *ffg)
static int ocfs2_info_freefrag_scan_bitmap(struct ocfs2_super *osb,
struct inode *gb_inode, u64 blkno,
struct ocfs2_info_freefrag *ffg)
{
u32 chunks_in_group;
int status = 0, unlock = 0, i;
Expand Down Expand Up @@ -652,8 +653,8 @@ int ocfs2_info_freefrag_scan_bitmap(struct ocfs2_super *osb,
return status;
}

int ocfs2_info_handle_freefrag(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_freefrag(struct inode *inode,
struct ocfs2_info_request __user *req)
{
u64 blkno = -1;
char namebuf[40];
Expand Down Expand Up @@ -723,8 +724,8 @@ int ocfs2_info_handle_freefrag(struct inode *inode,
return status;
}

int ocfs2_info_handle_unknown(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_unknown(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_request oir;
Expand Down Expand Up @@ -752,8 +753,8 @@ int ocfs2_info_handle_unknown(struct inode *inode,
* - distinguish different requests.
* - validate size of different requests.
*/
int ocfs2_info_handle_request(struct inode *inode,
struct ocfs2_info_request __user *req)
static int ocfs2_info_handle_request(struct inode *inode,
struct ocfs2_info_request __user *req)
{
int status = -EFAULT;
struct ocfs2_info_request oir;
Expand Down Expand Up @@ -811,8 +812,8 @@ int ocfs2_info_handle_request(struct inode *inode,
return status;
}

int ocfs2_get_request_ptr(struct ocfs2_info *info, int idx,
u64 *req_addr, int compat_flag)
static int ocfs2_get_request_ptr(struct ocfs2_info *info, int idx,
u64 *req_addr, int compat_flag)
{
int status = -EFAULT;
u64 __user *bp = NULL;
Expand Down Expand Up @@ -849,8 +850,8 @@ int ocfs2_get_request_ptr(struct ocfs2_info *info, int idx,
* a better backward&forward compatibility, since a small piece of
* request will be less likely to be broken if disk layout get changed.
*/
int ocfs2_info_handle(struct inode *inode, struct ocfs2_info *info,
int compat_flag)
static int ocfs2_info_handle(struct inode *inode, struct ocfs2_info *info,
int compat_flag)
{
int i, status = 0;
u64 req_addr;
Expand Down

0 comments on commit c253ed1

Please sign in to comment.