提交 c1618208 编写于 作者: F Fabian Frederick 提交者: Linus Torvalds

fs/affs: add prefix to some functions

secs_to_datestamp(time64_t secs, struct affs_date *ds);
prot_to_mode(u32 prot);
mode_to_prot(struct inode *inode);

were declared without affs_ prefix

Link: http://lkml.kernel.org/r/20170109191208.6085-6-fabf@skynet.beSigned-off-by: NFabian Frederick <fabf@skynet.be>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 1bafd6f1
...@@ -138,9 +138,9 @@ extern int affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh); ...@@ -138,9 +138,9 @@ extern int affs_remove_hash(struct inode *dir, struct buffer_head *rem_bh);
extern int affs_remove_header(struct dentry *dentry); extern int affs_remove_header(struct dentry *dentry);
extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh); extern u32 affs_checksum_block(struct super_block *sb, struct buffer_head *bh);
extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh); extern void affs_fix_checksum(struct super_block *sb, struct buffer_head *bh);
extern void secs_to_datestamp(time64_t secs, struct affs_date *ds); extern void affs_secs_to_datestamp(time64_t secs, struct affs_date *ds);
extern umode_t prot_to_mode(u32 prot); extern umode_t affs_prot_to_mode(u32 prot);
extern void mode_to_prot(struct inode *inode); extern void affs_mode_to_prot(struct inode *inode);
__printf(3, 4) __printf(3, 4)
extern void affs_error(struct super_block *sb, const char *function, extern void affs_error(struct super_block *sb, const char *function,
const char *fmt, ...); const char *fmt, ...);
......
...@@ -367,7 +367,7 @@ affs_fix_checksum(struct super_block *sb, struct buffer_head *bh) ...@@ -367,7 +367,7 @@ affs_fix_checksum(struct super_block *sb, struct buffer_head *bh)
} }
void void
secs_to_datestamp(time64_t secs, struct affs_date *ds) affs_secs_to_datestamp(time64_t secs, struct affs_date *ds)
{ {
u32 days; u32 days;
u32 minute; u32 minute;
...@@ -386,7 +386,7 @@ secs_to_datestamp(time64_t secs, struct affs_date *ds) ...@@ -386,7 +386,7 @@ secs_to_datestamp(time64_t secs, struct affs_date *ds)
} }
umode_t umode_t
prot_to_mode(u32 prot) affs_prot_to_mode(u32 prot)
{ {
umode_t mode = 0; umode_t mode = 0;
...@@ -413,7 +413,7 @@ prot_to_mode(u32 prot) ...@@ -413,7 +413,7 @@ prot_to_mode(u32 prot)
} }
void void
mode_to_prot(struct inode *inode) affs_mode_to_prot(struct inode *inode)
{ {
u32 prot = AFFS_I(inode)->i_protect; u32 prot = AFFS_I(inode)->i_protect;
umode_t mode = inode->i_mode; umode_t mode = inode->i_mode;
......
...@@ -69,7 +69,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino) ...@@ -69,7 +69,7 @@ struct inode *affs_iget(struct super_block *sb, unsigned long ino)
if (affs_test_opt(sbi->s_flags, SF_SETMODE)) if (affs_test_opt(sbi->s_flags, SF_SETMODE))
inode->i_mode = sbi->s_mode; inode->i_mode = sbi->s_mode;
else else
inode->i_mode = prot_to_mode(prot); inode->i_mode = affs_prot_to_mode(prot);
id = be16_to_cpu(tail->uid); id = be16_to_cpu(tail->uid);
if (id == 0 || affs_test_opt(sbi->s_flags, SF_SETUID)) if (id == 0 || affs_test_opt(sbi->s_flags, SF_SETUID))
...@@ -184,11 +184,12 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc) ...@@ -184,11 +184,12 @@ affs_write_inode(struct inode *inode, struct writeback_control *wbc)
} }
tail = AFFS_TAIL(sb, bh); tail = AFFS_TAIL(sb, bh);
if (tail->stype == cpu_to_be32(ST_ROOT)) { if (tail->stype == cpu_to_be32(ST_ROOT)) {
secs_to_datestamp(inode->i_mtime.tv_sec,&AFFS_ROOT_TAIL(sb, bh)->root_change); affs_secs_to_datestamp(inode->i_mtime.tv_sec,
&AFFS_ROOT_TAIL(sb, bh)->root_change);
} else { } else {
tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect); tail->protect = cpu_to_be32(AFFS_I(inode)->i_protect);
tail->size = cpu_to_be32(inode->i_size); tail->size = cpu_to_be32(inode->i_size);
secs_to_datestamp(inode->i_mtime.tv_sec,&tail->change); affs_secs_to_datestamp(inode->i_mtime.tv_sec, &tail->change);
if (!(inode->i_ino == AFFS_SB(sb)->s_root_block)) { if (!(inode->i_ino == AFFS_SB(sb)->s_root_block)) {
uid = i_uid_read(inode); uid = i_uid_read(inode);
gid = i_gid_read(inode); gid = i_gid_read(inode);
...@@ -249,7 +250,7 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr) ...@@ -249,7 +250,7 @@ affs_notify_change(struct dentry *dentry, struct iattr *attr)
mark_inode_dirty(inode); mark_inode_dirty(inode);
if (attr->ia_valid & ATTR_MODE) if (attr->ia_valid & ATTR_MODE)
mode_to_prot(inode); affs_mode_to_prot(inode);
out: out:
return error; return error;
} }
......
...@@ -272,7 +272,7 @@ affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl) ...@@ -272,7 +272,7 @@ affs_create(struct inode *dir, struct dentry *dentry, umode_t mode, bool excl)
return -ENOSPC; return -ENOSPC;
inode->i_mode = mode; inode->i_mode = mode;
mode_to_prot(inode); affs_mode_to_prot(inode);
mark_inode_dirty(inode); mark_inode_dirty(inode);
inode->i_op = &affs_file_inode_operations; inode->i_op = &affs_file_inode_operations;
...@@ -302,7 +302,7 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) ...@@ -302,7 +302,7 @@ affs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return -ENOSPC; return -ENOSPC;
inode->i_mode = S_IFDIR | mode; inode->i_mode = S_IFDIR | mode;
mode_to_prot(inode); affs_mode_to_prot(inode);
inode->i_op = &affs_dir_inode_operations; inode->i_op = &affs_dir_inode_operations;
inode->i_fop = &affs_dir_operations; inode->i_fop = &affs_dir_operations;
...@@ -348,7 +348,7 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname) ...@@ -348,7 +348,7 @@ affs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
inode_nohighmem(inode); inode_nohighmem(inode);
inode->i_data.a_ops = &affs_symlink_aops; inode->i_data.a_ops = &affs_symlink_aops;
inode->i_mode = S_IFLNK | 0777; inode->i_mode = S_IFLNK | 0777;
mode_to_prot(inode); affs_mode_to_prot(inode);
error = -EIO; error = -EIO;
bh = affs_bread(sb, inode->i_ino); bh = affs_bread(sb, inode->i_ino);
......
...@@ -32,7 +32,7 @@ affs_commit_super(struct super_block *sb, int wait) ...@@ -32,7 +32,7 @@ affs_commit_super(struct super_block *sb, int wait)
struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh); struct affs_root_tail *tail = AFFS_ROOT_TAIL(sb, bh);
lock_buffer(bh); lock_buffer(bh);
secs_to_datestamp(ktime_get_real_seconds(), &tail->disk_change); affs_secs_to_datestamp(ktime_get_real_seconds(), &tail->disk_change);
affs_fix_checksum(sb, bh); affs_fix_checksum(sb, bh);
unlock_buffer(bh); unlock_buffer(bh);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册