diff options
Diffstat (limited to 'kernel/fs/affs')
-rw-r--r-- | kernel/fs/affs/affs.h | 2 | ||||
-rw-r--r-- | kernel/fs/affs/amigaffs.c | 2 | ||||
-rw-r--r-- | kernel/fs/affs/inode.c | 2 | ||||
-rw-r--r-- | kernel/fs/affs/super.c | 8 | ||||
-rw-r--r-- | kernel/fs/affs/symlink.c | 4 |
5 files changed, 9 insertions, 9 deletions
diff --git a/kernel/fs/affs/affs.h b/kernel/fs/affs/affs.h index cffe8370f..c69a87eaf 100644 --- a/kernel/fs/affs/affs.h +++ b/kernel/fs/affs/affs.h @@ -64,7 +64,7 @@ struct affs_inode_info { /* short cut to get to the affs specific inode data */ static inline struct affs_inode_info *AFFS_I(struct inode *inode) { - return list_entry(inode, struct affs_inode_info, vfs_inode); + return container_of(inode, struct affs_inode_info, vfs_inode); } /* diff --git a/kernel/fs/affs/amigaffs.c b/kernel/fs/affs/amigaffs.c index a8f463c02..5fa92bc79 100644 --- a/kernel/fs/affs/amigaffs.c +++ b/kernel/fs/affs/amigaffs.c @@ -140,7 +140,7 @@ affs_remove_link(struct dentry *dentry) { struct inode *dir, *inode = d_inode(dentry); struct super_block *sb = inode->i_sb; - struct buffer_head *bh = NULL, *link_bh = NULL; + struct buffer_head *bh, *link_bh = NULL; u32 link_ino, ino; int retval; diff --git a/kernel/fs/affs/inode.c b/kernel/fs/affs/inode.c index a022f4acc..173495005 100644 --- a/kernel/fs/affs/inode.c +++ b/kernel/fs/affs/inode.c @@ -346,7 +346,7 @@ affs_add_entry(struct inode *dir, struct inode *inode, struct dentry *dentry, s3 { struct super_block *sb = dir->i_sb; struct buffer_head *inode_bh = NULL; - struct buffer_head *bh = NULL; + struct buffer_head *bh; u32 block = 0; int retval; diff --git a/kernel/fs/affs/super.c b/kernel/fs/affs/super.c index 3f89c9e05..5b50c4ca4 100644 --- a/kernel/fs/affs/super.c +++ b/kernel/fs/affs/super.c @@ -18,6 +18,7 @@ #include <linux/sched.h> #include <linux/slab.h> #include <linux/writeback.h> +#include <linux/blkdev.h> #include "affs.h" static int affs_statfs(struct dentry *dentry, struct kstatfs *buf); @@ -352,18 +353,19 @@ static int affs_fill_super(struct super_block *sb, void *data, int silent) * blocks, we will have to change it. */ - size = sb->s_bdev->bd_inode->i_size >> 9; + size = i_size_read(sb->s_bdev->bd_inode) >> 9; pr_debug("initial blocksize=%d, #blocks=%d\n", 512, size); affs_set_blocksize(sb, PAGE_SIZE); /* Try to find root block. Its location depends on the block size. */ - i = 512; - j = 4096; + i = bdev_logical_block_size(sb->s_bdev); + j = PAGE_SIZE; if (blocksize > 0) { i = j = blocksize; size = size / (blocksize / 512); } + for (blocksize = i; blocksize <= j; blocksize <<= 1, size >>= 1) { sbi->s_root_block = root_block; if (root_block < 0) diff --git a/kernel/fs/affs/symlink.c b/kernel/fs/affs/symlink.c index f39b71c39..ea5b69a18 100644 --- a/kernel/fs/affs/symlink.c +++ b/kernel/fs/affs/symlink.c @@ -16,14 +16,12 @@ static int affs_symlink_readpage(struct file *file, struct page *page) struct inode *inode = page->mapping->host; char *link = kmap(page); struct slink_front *lf; - int err; int i, j; char c; char lc; pr_debug("follow_link(ino=%lu)\n", inode->i_ino); - err = -EIO; bh = affs_bread(inode->i_sb, inode->i_ino); if (!bh) goto fail; @@ -66,7 +64,7 @@ fail: SetPageError(page); kunmap(page); unlock_page(page); - return err; + return -EIO; } const struct address_space_operations affs_symlink_aops = { |