Skip to content

Commit 9e443bc

Browse files
James Hoganrichardweinberger
authored andcommitted
um: hostfs: make functions static
The hostfs_*() callback functions are all only used within hostfs_kern.c, so make them static. Signed-off-by: James Hogan <james.hogan@imgtec.com> Cc: Jeff Dike <jdike@addtoit.com> Cc: Richard Weinberger <richard@nod.at> Cc: user-mode-linux-devel@lists.sourceforge.net Signed-off-by: Richard Weinberger <richard@nod.at>
1 parent 9af2452 commit 9e443bc

1 file changed

Lines changed: 28 additions & 25 deletions

File tree

‎fs/hostfs/hostfs_kern.c‎

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ static struct inode *hostfs_iget(struct super_block *sb)
186186
return inode;
187187
}
188188

189-
int hostfs_statfs(struct dentry *dentry, struct kstatfs *sf)
189+
static int hostfs_statfs(struct dentry *dentry, struct kstatfs *sf)
190190
{
191191
/*
192192
* do_statfs uses struct statfs64 internally, but the linux kernel
@@ -268,7 +268,7 @@ static const struct super_operations hostfs_sbops = {
268268
.show_options = hostfs_show_options,
269269
};
270270

271-
int hostfs_readdir(struct file *file, struct dir_context *ctx)
271+
static int hostfs_readdir(struct file *file, struct dir_context *ctx)
272272
{
273273
void *dir;
274274
char *name;
@@ -293,7 +293,7 @@ int hostfs_readdir(struct file *file, struct dir_context *ctx)
293293
return 0;
294294
}
295295

296-
int hostfs_file_open(struct inode *ino, struct file *file)
296+
static int hostfs_file_open(struct inode *ino, struct file *file)
297297
{
298298
static DEFINE_MUTEX(open_mutex);
299299
char *name;
@@ -359,7 +359,8 @@ static int hostfs_file_release(struct inode *inode, struct file *file)
359359
return 0;
360360
}
361361

362-
int hostfs_fsync(struct file *file, loff_t start, loff_t end, int datasync)
362+
static int hostfs_fsync(struct file *file, loff_t start, loff_t end,
363+
int datasync)
363364
{
364365
struct inode *inode = file->f_mapping->host;
365366
int ret;
@@ -394,7 +395,7 @@ static const struct file_operations hostfs_dir_fops = {
394395
.read = generic_read_dir,
395396
};
396397

397-
int hostfs_writepage(struct page *page, struct writeback_control *wbc)
398+
static int hostfs_writepage(struct page *page, struct writeback_control *wbc)
398399
{
399400
struct address_space *mapping = page->mapping;
400401
struct inode *inode = mapping->host;
@@ -430,7 +431,7 @@ int hostfs_writepage(struct page *page, struct writeback_control *wbc)
430431
return err;
431432
}
432433

433-
int hostfs_readpage(struct file *file, struct page *page)
434+
static int hostfs_readpage(struct file *file, struct page *page)
434435
{
435436
char *buffer;
436437
long long start;
@@ -455,9 +456,9 @@ int hostfs_readpage(struct file *file, struct page *page)
455456
return err;
456457
}
457458

458-
int hostfs_write_begin(struct file *file, struct address_space *mapping,
459-
loff_t pos, unsigned len, unsigned flags,
460-
struct page **pagep, void **fsdata)
459+
static int hostfs_write_begin(struct file *file, struct address_space *mapping,
460+
loff_t pos, unsigned len, unsigned flags,
461+
struct page **pagep, void **fsdata)
461462
{
462463
pgoff_t index = pos >> PAGE_CACHE_SHIFT;
463464

@@ -467,9 +468,9 @@ int hostfs_write_begin(struct file *file, struct address_space *mapping,
467468
return 0;
468469
}
469470

470-
int hostfs_write_end(struct file *file, struct address_space *mapping,
471-
loff_t pos, unsigned len, unsigned copied,
472-
struct page *page, void *fsdata)
471+
static int hostfs_write_end(struct file *file, struct address_space *mapping,
472+
loff_t pos, unsigned len, unsigned copied,
473+
struct page *page, void *fsdata)
473474
{
474475
struct inode *inode = mapping->host;
475476
void *buffer;
@@ -549,8 +550,8 @@ static int read_name(struct inode *ino, char *name)
549550
return 0;
550551
}
551552

552-
int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
553-
bool excl)
553+
static int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
554+
bool excl)
554555
{
555556
struct inode *inode;
556557
char *name;
@@ -591,8 +592,8 @@ int hostfs_create(struct inode *dir, struct dentry *dentry, umode_t mode,
591592
return error;
592593
}
593594

594-
struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
595-
unsigned int flags)
595+
static struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
596+
unsigned int flags)
596597
{
597598
struct inode *inode;
598599
char *name;
@@ -628,7 +629,8 @@ struct dentry *hostfs_lookup(struct inode *ino, struct dentry *dentry,
628629
return ERR_PTR(err);
629630
}
630631

631-
int hostfs_link(struct dentry *to, struct inode *ino, struct dentry *from)
632+
static int hostfs_link(struct dentry *to, struct inode *ino,
633+
struct dentry *from)
632634
{
633635
char *from_name, *to_name;
634636
int err;
@@ -646,7 +648,7 @@ int hostfs_link(struct dentry *to, struct inode *ino, struct dentry *from)
646648
return err;
647649
}
648650

649-
int hostfs_unlink(struct inode *ino, struct dentry *dentry)
651+
static int hostfs_unlink(struct inode *ino, struct dentry *dentry)
650652
{
651653
char *file;
652654
int err;
@@ -662,7 +664,8 @@ int hostfs_unlink(struct inode *ino, struct dentry *dentry)
662664
return err;
663665
}
664666

665-
int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to)
667+
static int hostfs_symlink(struct inode *ino, struct dentry *dentry,
668+
const char *to)
666669
{
667670
char *file;
668671
int err;
@@ -674,7 +677,7 @@ int hostfs_symlink(struct inode *ino, struct dentry *dentry, const char *to)
674677
return err;
675678
}
676679

677-
int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
680+
static int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
678681
{
679682
char *file;
680683
int err;
@@ -686,7 +689,7 @@ int hostfs_mkdir(struct inode *ino, struct dentry *dentry, umode_t mode)
686689
return err;
687690
}
688691

689-
int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
692+
static int hostfs_rmdir(struct inode *ino, struct dentry *dentry)
690693
{
691694
char *file;
692695
int err;
@@ -738,8 +741,8 @@ static int hostfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode,
738741
return err;
739742
}
740743

741-
int hostfs_rename(struct inode *from_ino, struct dentry *from,
742-
struct inode *to_ino, struct dentry *to)
744+
static int hostfs_rename(struct inode *from_ino, struct dentry *from,
745+
struct inode *to_ino, struct dentry *to)
743746
{
744747
char *from_name, *to_name;
745748
int err;
@@ -756,7 +759,7 @@ int hostfs_rename(struct inode *from_ino, struct dentry *from,
756759
return err;
757760
}
758761

759-
int hostfs_permission(struct inode *ino, int desired)
762+
static int hostfs_permission(struct inode *ino, int desired)
760763
{
761764
char *name;
762765
int r = 0, w = 0, x = 0, err;
@@ -782,7 +785,7 @@ int hostfs_permission(struct inode *ino, int desired)
782785
return err;
783786
}
784787

785-
int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
788+
static int hostfs_setattr(struct dentry *dentry, struct iattr *attr)
786789
{
787790
struct inode *inode = dentry->d_inode;
788791
struct hostfs_iattr attrs;

0 commit comments

Comments
 (0)