summaryrefslogtreecommitdiffstats
path: root/fs/minix/minix.h
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2011-11-29 15:50:17 +0100
committerArnd Bergmann <arnd@arndb.de>2011-11-29 15:50:17 +0100
commit98014be39bda8277a5ad130bb274ed6eb18b74df (patch)
tree974620a47c9350ff9b3c06ffd2b49470bbda72ab /fs/minix/minix.h
parentMerge branch 'fixes-dss' of git://git.kernel.org/pub/scm/linux/kernel/git/tml... (diff)
parentARM: ux500: update defconfig (diff)
downloadlinux-98014be39bda8277a5ad130bb274ed6eb18b74df.tar.xz
linux-98014be39bda8277a5ad130bb274ed6eb18b74df.zip
Merge branch 'defconfigs-for-arnd' of git://git.linaro.org/people/triad/linux-stericsson into fixes
Diffstat (limited to 'fs/minix/minix.h')
-rw-r--r--fs/minix/minix.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/fs/minix/minix.h b/fs/minix/minix.h
index 341e2122879a..26bbd55e82ea 100644
--- a/fs/minix/minix.h
+++ b/fs/minix/minix.h
@@ -48,10 +48,10 @@ extern struct minix_inode * minix_V1_raw_inode(struct super_block *, ino_t, stru
extern struct minix2_inode * minix_V2_raw_inode(struct super_block *, ino_t, struct buffer_head **);
extern struct inode * minix_new_inode(const struct inode *, int, int *);
extern void minix_free_inode(struct inode * inode);
-extern unsigned long minix_count_free_inodes(struct minix_sb_info *sbi);
+extern unsigned long minix_count_free_inodes(struct super_block *sb);
extern int minix_new_block(struct inode * inode);
extern void minix_free_block(struct inode *inode, unsigned long block);
-extern unsigned long minix_count_free_blocks(struct minix_sb_info *sbi);
+extern unsigned long minix_count_free_blocks(struct super_block *sb);
extern int minix_getattr(struct vfsmount *, struct dentry *, struct kstat *);
extern int minix_prepare_chunk(struct page *page, loff_t pos, unsigned len);
@@ -88,6 +88,11 @@ static inline struct minix_inode_info *minix_i(struct inode *inode)
return list_entry(inode, struct minix_inode_info, vfs_inode);
}
+static inline unsigned minix_blocks_needed(unsigned bits, unsigned blocksize)
+{
+ return DIV_ROUND_UP(bits, blocksize * 8);
+}
+
#if defined(CONFIG_MINIX_FS_NATIVE_ENDIAN) && \
defined(CONFIG_MINIX_FS_BIG_ENDIAN_16BIT_INDEXED)
@@ -125,7 +130,7 @@ static inline int minix_find_first_zero_bit(const void *vaddr, unsigned size)
if (!size)
return 0;
- size = (size >> 4) + ((size & 15) > 0);
+ size >>= 4;
while (*p++ == 0xffff) {
if (--size == 0)
return (p - addr) << 4;