aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorplougher <plougher>2009-01-31 07:31:51 +0000
committerMohamad Ayyash <mkayyash@google.com>2015-02-23 12:34:11 -0800
commit5921b8d869f8d9a5a15a520eee1cfae06b1d9688 (patch)
tree6baeb0757b05a60a479d4e7ccb3d9364736f0253
parentf744e8c409cf4d65c01c36c4036d09e3e096a3f9 (diff)
downloadsquashfs-tools-5921b8d869f8d9a5a15a520eee1cfae06b1d9688.tar.gz
Rename SQUASHFS_I() to squashfs_i().
Signed-off-by: Phillip Lougher <phillip@lougher.demon.co.uk>
-rw-r--r--kernel/fs/squashfs/dir.c12
-rw-r--r--kernel/fs/squashfs/export.c2
-rw-r--r--kernel/fs/squashfs/file.c20
-rw-r--r--kernel/fs/squashfs/inode.c56
-rw-r--r--kernel/fs/squashfs/namei.c14
-rw-r--r--kernel/fs/squashfs/squashfs.h2
-rw-r--r--kernel/fs/squashfs/super.c4
-rw-r--r--kernel/fs/squashfs/symlink.c12
8 files changed, 61 insertions, 61 deletions
diff --git a/kernel/fs/squashfs/dir.c b/kernel/fs/squashfs/dir.c
index f5564e5..951e851 100644
--- a/kernel/fs/squashfs/dir.c
+++ b/kernel/fs/squashfs/dir.c
@@ -106,8 +106,8 @@ static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
{
struct inode *inode = file->f_dentry->d_inode;
struct squashfs_sb_info *msblk = inode->i_sb->s_fs_info;
- long long block = SQUASHFS_I(inode)->start + msblk->directory_table;
- int offset = SQUASHFS_I(inode)->offset, length = 0, dir_count, size,
+ long long block = squashfs_i(inode)->start + msblk->directory_table;
+ int offset = squashfs_i(inode)->offset, length = 0, dir_count, size,
type, err;
unsigned int inode_number;
struct squashfs_dir_header dirh;
@@ -140,7 +140,7 @@ static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
} else {
name = "..";
size = 2;
- i_ino = SQUASHFS_I(inode)->parent;
+ i_ino = squashfs_i(inode)->parent;
}
TRACE("Calling filldir(%p, %s, %d, %lld, %d, %d)\n",
@@ -157,9 +157,9 @@ static int squashfs_readdir(struct file *file, void *dirent, filldir_t filldir)
}
length = get_dir_index_using_offset(inode->i_sb, &block, &offset,
- SQUASHFS_I(inode)->dir_idx_start,
- SQUASHFS_I(inode)->dir_idx_offset,
- SQUASHFS_I(inode)->dir_idx_cnt,
+ squashfs_i(inode)->dir_idx_start,
+ squashfs_i(inode)->dir_idx_offset,
+ squashfs_i(inode)->dir_idx_cnt,
file->f_pos);
while (length < i_size_read(inode)) {
diff --git a/kernel/fs/squashfs/export.c b/kernel/fs/squashfs/export.c
index 27aadbe..2cb3de2 100644
--- a/kernel/fs/squashfs/export.c
+++ b/kernel/fs/squashfs/export.c
@@ -111,7 +111,7 @@ static struct dentry *squashfs_fh_to_parent(struct super_block *sb,
static struct dentry *squashfs_get_parent(struct dentry *child)
{
struct inode *inode = child->d_inode;
- unsigned int parent_ino = SQUASHFS_I(inode)->parent;
+ unsigned int parent_ino = squashfs_i(inode)->parent;
return squashfs_export_iget(inode->i_sb, parent_ino);
}
diff --git a/kernel/fs/squashfs/file.c b/kernel/fs/squashfs/file.c
index f740600..5dd960c 100644
--- a/kernel/fs/squashfs/file.c
+++ b/kernel/fs/squashfs/file.c
@@ -243,9 +243,9 @@ static int fill_meta_index(struct inode *inode, int index,
int offset = 0;
struct meta_index *meta;
struct meta_entry *meta_entry;
- long long cur_index_block = SQUASHFS_I(inode)->block_list_start;
- int cur_offset = SQUASHFS_I(inode)->offset;
- long long cur_data_block = SQUASHFS_I(inode)->start;
+ long long cur_index_block = squashfs_i(inode)->block_list_start;
+ int cur_offset = squashfs_i(inode)->offset;
+ long long cur_data_block = squashfs_i(inode)->start;
int err, i;
/*
@@ -392,13 +392,13 @@ static int squashfs_readpage(struct file *file, struct page *page)
int offset = 0, sparse = 0;
TRACE("Entered squashfs_readpage, page index %lx, start block %llx\n",
- page->index, SQUASHFS_I(inode)->start);
+ page->index, squashfs_i(inode)->start);
if (page->index >= ((i_size_read(inode) + PAGE_CACHE_SIZE - 1) >>
PAGE_CACHE_SHIFT))
goto out;
- if (index < file_end || SQUASHFS_I(inode)->fragment_block ==
+ if (index < file_end || squashfs_i(inode)->fragment_block ==
SQUASHFS_INVALID_BLK) {
/*
* Reading a datablock from disk. Need to read block list
@@ -433,18 +433,18 @@ static int squashfs_readpage(struct file *file, struct page *page)
* block).
*/
buffer = squashfs_get_fragment(inode->i_sb,
- SQUASHFS_I(inode)->fragment_block,
- SQUASHFS_I(inode)->fragment_size);
+ squashfs_i(inode)->fragment_block,
+ squashfs_i(inode)->fragment_size);
if (buffer->error) {
ERROR("Unable to read page, block %llx, size %x\n",
- SQUASHFS_I(inode)->fragment_block,
- SQUASHFS_I(inode)->fragment_size);
+ squashfs_i(inode)->fragment_block,
+ squashfs_i(inode)->fragment_size);
squashfs_cache_put(buffer);
goto error_out;
}
bytes = i_size_read(inode) & (msblk->block_size - 1);
- offset = SQUASHFS_I(inode)->fragment_offset;
+ offset = squashfs_i(inode)->fragment_offset;
}
/*
diff --git a/kernel/fs/squashfs/inode.c b/kernel/fs/squashfs/inode.c
index 5e159ea..da26afa 100644
--- a/kernel/fs/squashfs/inode.c
+++ b/kernel/fs/squashfs/inode.c
@@ -161,17 +161,17 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_fop = &generic_ro_fops;
inode->i_mode |= S_IFREG;
inode->i_blocks = ((inode->i_size - 1) >> 9) + 1;
- SQUASHFS_I(inode)->fragment_block = frag_blk;
- SQUASHFS_I(inode)->fragment_size = frag_size;
- SQUASHFS_I(inode)->fragment_offset = frag_offset;
- SQUASHFS_I(inode)->start = le32_to_cpu(sqsh_ino->start_block);
- SQUASHFS_I(inode)->block_list_start = block;
- SQUASHFS_I(inode)->offset = offset;
+ squashfs_i(inode)->fragment_block = frag_blk;
+ squashfs_i(inode)->fragment_size = frag_size;
+ squashfs_i(inode)->fragment_offset = frag_offset;
+ squashfs_i(inode)->start = le32_to_cpu(sqsh_ino->start_block);
+ squashfs_i(inode)->block_list_start = block;
+ squashfs_i(inode)->offset = offset;
inode->i_data.a_ops = &squashfs_aops;
TRACE("File inode %x:%x, start_block %llx, block_list_start "
"%llx, offset %x\n", SQUASHFS_INODE_BLK(ino),
- offset, SQUASHFS_I(inode)->start, block, offset);
+ offset, squashfs_i(inode)->start, block, offset);
break;
}
case SQUASHFS_LREG_TYPE: {
@@ -205,17 +205,17 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_blocks = ((inode->i_size -
le64_to_cpu(sqsh_ino->sparse) - 1) >> 9) + 1;
- SQUASHFS_I(inode)->fragment_block = frag_blk;
- SQUASHFS_I(inode)->fragment_size = frag_size;
- SQUASHFS_I(inode)->fragment_offset = frag_offset;
- SQUASHFS_I(inode)->start = le64_to_cpu(sqsh_ino->start_block);
- SQUASHFS_I(inode)->block_list_start = block;
- SQUASHFS_I(inode)->offset = offset;
+ squashfs_i(inode)->fragment_block = frag_blk;
+ squashfs_i(inode)->fragment_size = frag_size;
+ squashfs_i(inode)->fragment_offset = frag_offset;
+ squashfs_i(inode)->start = le64_to_cpu(sqsh_ino->start_block);
+ squashfs_i(inode)->block_list_start = block;
+ squashfs_i(inode)->offset = offset;
inode->i_data.a_ops = &squashfs_aops;
TRACE("File inode %x:%x, start_block %llx, block_list_start "
"%llx, offset %x\n", SQUASHFS_INODE_BLK(ino),
- offset, SQUASHFS_I(inode)->start, block, offset);
+ offset, squashfs_i(inode)->start, block, offset);
break;
}
case SQUASHFS_DIR_TYPE: {
@@ -231,14 +231,14 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_op = &squashfs_dir_inode_ops;
inode->i_fop = &squashfs_dir_ops;
inode->i_mode |= S_IFDIR;
- SQUASHFS_I(inode)->start = le32_to_cpu(sqsh_ino->start_block);
- SQUASHFS_I(inode)->offset = le16_to_cpu(sqsh_ino->offset);
- SQUASHFS_I(inode)->dir_idx_cnt = 0;
- SQUASHFS_I(inode)->parent = le32_to_cpu(sqsh_ino->parent_inode);
+ squashfs_i(inode)->start = le32_to_cpu(sqsh_ino->start_block);
+ squashfs_i(inode)->offset = le16_to_cpu(sqsh_ino->offset);
+ squashfs_i(inode)->dir_idx_cnt = 0;
+ squashfs_i(inode)->parent = le32_to_cpu(sqsh_ino->parent_inode);
TRACE("Directory inode %x:%x, start_block %llx, offset %x\n",
SQUASHFS_INODE_BLK(ino), offset,
- SQUASHFS_I(inode)->start,
+ squashfs_i(inode)->start,
le16_to_cpu(sqsh_ino->offset));
break;
}
@@ -255,16 +255,16 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_op = &squashfs_dir_inode_ops;
inode->i_fop = &squashfs_dir_ops;
inode->i_mode |= S_IFDIR;
- SQUASHFS_I(inode)->start = le32_to_cpu(sqsh_ino->start_block);
- SQUASHFS_I(inode)->offset = le16_to_cpu(sqsh_ino->offset);
- SQUASHFS_I(inode)->dir_idx_start = block;
- SQUASHFS_I(inode)->dir_idx_offset = offset;
- SQUASHFS_I(inode)->dir_idx_cnt = le16_to_cpu(sqsh_ino->i_count);
- SQUASHFS_I(inode)->parent = le32_to_cpu(sqsh_ino->parent_inode);
+ squashfs_i(inode)->start = le32_to_cpu(sqsh_ino->start_block);
+ squashfs_i(inode)->offset = le16_to_cpu(sqsh_ino->offset);
+ squashfs_i(inode)->dir_idx_start = block;
+ squashfs_i(inode)->dir_idx_offset = offset;
+ squashfs_i(inode)->dir_idx_cnt = le16_to_cpu(sqsh_ino->i_count);
+ squashfs_i(inode)->parent = le32_to_cpu(sqsh_ino->parent_inode);
TRACE("Long directory inode %x:%x, start_block %llx, offset "
"%x\n", SQUASHFS_INODE_BLK(ino), offset,
- SQUASHFS_I(inode)->start,
+ squashfs_i(inode)->start,
le16_to_cpu(sqsh_ino->offset));
break;
}
@@ -282,8 +282,8 @@ int squashfs_read_inode(struct inode *inode, long long ino)
inode->i_op = &page_symlink_inode_operations;
inode->i_data.a_ops = &squashfs_symlink_aops;
inode->i_mode |= S_IFLNK;
- SQUASHFS_I(inode)->start = block;
- SQUASHFS_I(inode)->offset = offset;
+ squashfs_i(inode)->start = block;
+ squashfs_i(inode)->offset = offset;
TRACE("Symbolic link inode %x:%x, start_block %llx, offset "
"%x\n", SQUASHFS_INODE_BLK(ino), offset,
diff --git a/kernel/fs/squashfs/namei.c b/kernel/fs/squashfs/namei.c
index db03ffe..1bfb312 100644
--- a/kernel/fs/squashfs/namei.c
+++ b/kernel/fs/squashfs/namei.c
@@ -141,8 +141,8 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
struct squashfs_sb_info *msblk = dir->i_sb->s_fs_info;
struct squashfs_dir_header dirh;
struct squashfs_dir_entry *dire;
- long long block = SQUASHFS_I(dir)->start + msblk->directory_table;
- int offset = SQUASHFS_I(dir)->offset;
+ long long block = squashfs_i(dir)->start + msblk->directory_table;
+ int offset = squashfs_i(dir)->offset;
int err, length = 0, dir_count, size;
TRACE("Entered squashfs_lookup [%llx:%x]\n", block, offset);
@@ -159,9 +159,9 @@ static struct dentry *squashfs_lookup(struct inode *dir, struct dentry *dentry,
}
length = get_dir_index_using_name(dir->i_sb, &block, &offset,
- SQUASHFS_I(dir)->dir_idx_start,
- SQUASHFS_I(dir)->dir_idx_offset,
- SQUASHFS_I(dir)->dir_idx_cnt, name, len);
+ squashfs_i(dir)->dir_idx_start,
+ squashfs_i(dir)->dir_idx_offset,
+ squashfs_i(dir)->dir_idx_cnt, name, len);
while (length < i_size_read(dir)) {
/*
@@ -229,8 +229,8 @@ exit_lookup:
read_failure:
ERROR("Unable to read directory block [%llx:%x]\n",
- SQUASHFS_I(dir)->start + msblk->directory_table,
- SQUASHFS_I(dir)->offset);
+ squashfs_i(dir)->start + msblk->directory_table,
+ squashfs_i(dir)->offset);
failed:
kfree(dire);
return ERR_PTR(err);
diff --git a/kernel/fs/squashfs/squashfs.h b/kernel/fs/squashfs/squashfs.h
index 8981c3b..204c0fa 100644
--- a/kernel/fs/squashfs/squashfs.h
+++ b/kernel/fs/squashfs/squashfs.h
@@ -27,7 +27,7 @@
#define WARNING(s, args...) pr_warning("SQUASHFS: "s, ## args)
-static inline struct squashfs_inode_info *SQUASHFS_I(struct inode *inode)
+static inline struct squashfs_inode_info *squashfs_i(struct inode *inode)
{
return list_entry(inode, struct squashfs_inode_info, vfs_inode);
}
diff --git a/kernel/fs/squashfs/super.c b/kernel/fs/squashfs/super.c
index 48e8c52..2a7f286 100644
--- a/kernel/fs/squashfs/super.c
+++ b/kernel/fs/squashfs/super.c
@@ -388,7 +388,7 @@ static int __init init_squashfs_fs(void)
return err;
}
- printk(KERN_INFO "squashfs: version 4.0 (2008/12/27) "
+ printk(KERN_INFO "squashfs: version 4.0 (2008/12/29) "
"Phillip Lougher\n");
return 0;
@@ -413,7 +413,7 @@ static struct inode *squashfs_alloc_inode(struct super_block *sb)
static void squashfs_destroy_inode(struct inode *inode)
{
- kmem_cache_free(squashfs_inode_cachep, SQUASHFS_I(inode));
+ kmem_cache_free(squashfs_inode_cachep, squashfs_i(inode));
}
diff --git a/kernel/fs/squashfs/symlink.c b/kernel/fs/squashfs/symlink.c
index 293e951..cee14b9 100644
--- a/kernel/fs/squashfs/symlink.c
+++ b/kernel/fs/squashfs/symlink.c
@@ -49,8 +49,8 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page)
struct super_block *sb = inode->i_sb;
struct squashfs_sb_info *msblk = sb->s_fs_info;
int index = page->index << PAGE_CACHE_SHIFT;
- long long block = SQUASHFS_I(inode)->start;
- int offset = SQUASHFS_I(inode)->offset;
+ long long block = squashfs_i(inode)->start;
+ int offset = squashfs_i(inode)->offset;
int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE);
int bytes, copied;
void *pageaddr;
@@ -67,8 +67,8 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page)
index);
if (bytes < 0) {
ERROR("Unable to read symlink [%llx:%x]\n",
- SQUASHFS_I(inode)->start,
- SQUASHFS_I(inode)->offset);
+ squashfs_i(inode)->start,
+ squashfs_i(inode)->offset);
goto error_out;
}
}
@@ -84,8 +84,8 @@ static int squashfs_symlink_readpage(struct file *file, struct page *page)
entry = squashfs_cache_get(sb, msblk->block_cache, block, 0);
if (entry->error) {
ERROR("Unable to read symlink [%llx:%x]\n",
- SQUASHFS_I(inode)->start,
- SQUASHFS_I(inode)->offset);
+ squashfs_i(inode)->start,
+ squashfs_i(inode)->offset);
squashfs_cache_put(entry);
goto error_out;
}