diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2016-05-23 19:23:39 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-23 20:04:14 -0400 |
commit | 0c6c44cb9f93f7c0ad803b41ae7c0b08cf6942e2 (patch) | |
tree | 4647ab990148950182368c90f9142be75153e6c9 | |
parent | 7592ecde65f908f082cfd3440888fd6ae99f4cbb (diff) |
nilfs2: avoid bare use of 'unsigned'
This fixes checkpatch.pl warning "WARNING: Prefer 'unsigned int' to
bare use of 'unsigned'".
Link: http://lkml.kernel.org/r/1462886671-3521-5-git-send-email-konishi.ryusuke@lab.ntt.co.jp
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/nilfs2/alloc.c | 8 | ||||
-rw-r--r-- | fs/nilfs2/alloc.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/bmap.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/bmap.h | 4 | ||||
-rw-r--r-- | fs/nilfs2/btree.c | 3 | ||||
-rw-r--r-- | fs/nilfs2/cpfile.c | 8 | ||||
-rw-r--r-- | fs/nilfs2/cpfile.h | 4 | ||||
-rw-r--r-- | fs/nilfs2/dat.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/dat.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/dir.c | 47 | ||||
-rw-r--r-- | fs/nilfs2/direct.c | 5 | ||||
-rw-r--r-- | fs/nilfs2/inode.c | 14 | ||||
-rw-r--r-- | fs/nilfs2/mdt.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/mdt.h | 6 | ||||
-rw-r--r-- | fs/nilfs2/namei.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/nilfs.h | 2 | ||||
-rw-r--r-- | fs/nilfs2/page.c | 8 | ||||
-rw-r--r-- | fs/nilfs2/page.h | 3 | ||||
-rw-r--r-- | fs/nilfs2/recovery.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/segbuf.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/segbuf.h | 5 | ||||
-rw-r--r-- | fs/nilfs2/segment.c | 18 | ||||
-rw-r--r-- | fs/nilfs2/segment.h | 4 | ||||
-rw-r--r-- | fs/nilfs2/sysfs.c | 6 | ||||
-rw-r--r-- | fs/nilfs2/the_nilfs.c | 4 | ||||
-rw-r--r-- | fs/nilfs2/the_nilfs.h | 10 | ||||
-rw-r--r-- | include/linux/nilfs2_fs.h | 6 |
27 files changed, 97 insertions, 90 deletions
diff --git a/fs/nilfs2/alloc.c b/fs/nilfs2/alloc.c index bdd5ac522904..698f582d69af 100644 --- a/fs/nilfs2/alloc.c +++ b/fs/nilfs2/alloc.c | |||
@@ -53,7 +53,7 @@ nilfs_palloc_groups_count(const struct inode *inode) | |||
53 | * @inode: inode of metadata file using this allocator | 53 | * @inode: inode of metadata file using this allocator |
54 | * @entry_size: size of the persistent object | 54 | * @entry_size: size of the persistent object |
55 | */ | 55 | */ |
56 | int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned entry_size) | 56 | int nilfs_palloc_init_blockgroup(struct inode *inode, unsigned int entry_size) |
57 | { | 57 | { |
58 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); | 58 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); |
59 | 59 | ||
@@ -384,7 +384,7 @@ void *nilfs_palloc_block_get_entry(const struct inode *inode, __u64 nr, | |||
384 | */ | 384 | */ |
385 | static int nilfs_palloc_find_available_slot(unsigned char *bitmap, | 385 | static int nilfs_palloc_find_available_slot(unsigned char *bitmap, |
386 | unsigned long target, | 386 | unsigned long target, |
387 | unsigned bsize, | 387 | unsigned int bsize, |
388 | spinlock_t *lock) | 388 | spinlock_t *lock) |
389 | { | 389 | { |
390 | int pos, end = bsize; | 390 | int pos, end = bsize; |
@@ -735,8 +735,8 @@ int nilfs_palloc_freev(struct inode *inode, __u64 *entry_nrs, size_t nitems) | |||
735 | unsigned long group, group_offset; | 735 | unsigned long group, group_offset; |
736 | __u64 group_min_nr, last_nrs[8]; | 736 | __u64 group_min_nr, last_nrs[8]; |
737 | const unsigned long epg = nilfs_palloc_entries_per_group(inode); | 737 | const unsigned long epg = nilfs_palloc_entries_per_group(inode); |
738 | const unsigned epb = NILFS_MDT(inode)->mi_entries_per_block; | 738 | const unsigned int epb = NILFS_MDT(inode)->mi_entries_per_block; |
739 | unsigned entry_start, end, pos; | 739 | unsigned int entry_start, end, pos; |
740 | spinlock_t *lock; | 740 | spinlock_t *lock; |
741 | int i, j, k, ret; | 741 | int i, j, k, ret; |
742 | u32 nfree; | 742 | u32 nfree; |
diff --git a/fs/nilfs2/alloc.h b/fs/nilfs2/alloc.h index 2bd567d98bc6..05149e606a78 100644 --- a/fs/nilfs2/alloc.h +++ b/fs/nilfs2/alloc.h | |||
@@ -37,7 +37,7 @@ nilfs_palloc_entries_per_group(const struct inode *inode) | |||
37 | return 1UL << (inode->i_blkbits + 3 /* log2(8 = CHAR_BITS) */); | 37 | return 1UL << (inode->i_blkbits + 3 /* log2(8 = CHAR_BITS) */); |
38 | } | 38 | } |
39 | 39 | ||
40 | int nilfs_palloc_init_blockgroup(struct inode *, unsigned); | 40 | int nilfs_palloc_init_blockgroup(struct inode *, unsigned int); |
41 | int nilfs_palloc_get_entry_block(struct inode *, __u64, int, | 41 | int nilfs_palloc_get_entry_block(struct inode *, __u64, int, |
42 | struct buffer_head **); | 42 | struct buffer_head **); |
43 | void *nilfs_palloc_block_get_entry(const struct inode *, __u64, | 43 | void *nilfs_palloc_block_get_entry(const struct inode *, __u64, |
diff --git a/fs/nilfs2/bmap.c b/fs/nilfs2/bmap.c index 4976fe3be4a5..f2a7877e0c8c 100644 --- a/fs/nilfs2/bmap.c +++ b/fs/nilfs2/bmap.c | |||
@@ -93,7 +93,7 @@ int nilfs_bmap_lookup_at_level(struct nilfs_bmap *bmap, __u64 key, int level, | |||
93 | } | 93 | } |
94 | 94 | ||
95 | int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, | 95 | int nilfs_bmap_lookup_contig(struct nilfs_bmap *bmap, __u64 key, __u64 *ptrp, |
96 | unsigned maxblocks) | 96 | unsigned int maxblocks) |
97 | { | 97 | { |
98 | int ret; | 98 | int ret; |
99 | 99 | ||
diff --git a/fs/nilfs2/bmap.h b/fs/nilfs2/bmap.h index c14f822682da..a6852807b22c 100644 --- a/fs/nilfs2/bmap.h +++ b/fs/nilfs2/bmap.h | |||
@@ -57,7 +57,7 @@ struct nilfs_bmap_stats { | |||
57 | struct nilfs_bmap_operations { | 57 | struct nilfs_bmap_operations { |
58 | int (*bop_lookup)(const struct nilfs_bmap *, __u64, int, __u64 *); | 58 | int (*bop_lookup)(const struct nilfs_bmap *, __u64, int, __u64 *); |
59 | int (*bop_lookup_contig)(const struct nilfs_bmap *, __u64, __u64 *, | 59 | int (*bop_lookup_contig)(const struct nilfs_bmap *, __u64, __u64 *, |
60 | unsigned); | 60 | unsigned int); |
61 | int (*bop_insert)(struct nilfs_bmap *, __u64, __u64); | 61 | int (*bop_insert)(struct nilfs_bmap *, __u64, __u64); |
62 | int (*bop_delete)(struct nilfs_bmap *, __u64); | 62 | int (*bop_delete)(struct nilfs_bmap *, __u64); |
63 | void (*bop_clear)(struct nilfs_bmap *); | 63 | void (*bop_clear)(struct nilfs_bmap *); |
@@ -150,7 +150,7 @@ struct nilfs_bmap_store { | |||
150 | int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *); | 150 | int nilfs_bmap_test_and_clear_dirty(struct nilfs_bmap *); |
151 | int nilfs_bmap_read(struct nilfs_bmap *, struct nilfs_inode *); | 151 | int nilfs_bmap_read(struct nilfs_bmap *, struct nilfs_inode *); |
152 | void nilfs_bmap_write(struct nilfs_bmap *, struct nilfs_inode *); | 152 | void nilfs_bmap_write(struct nilfs_bmap *, struct nilfs_inode *); |
153 | int nilfs_bmap_lookup_contig(struct nilfs_bmap *, __u64, __u64 *, unsigned); | 153 | int nilfs_bmap_lookup_contig(struct nilfs_bmap *, __u64, __u64 *, unsigned int); |
154 | int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec); | 154 | int nilfs_bmap_insert(struct nilfs_bmap *bmap, __u64 key, unsigned long rec); |
155 | int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key); | 155 | int nilfs_bmap_delete(struct nilfs_bmap *bmap, __u64 key); |
156 | int nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp); | 156 | int nilfs_bmap_seek_key(struct nilfs_bmap *bmap, __u64 start, __u64 *keyp); |
diff --git a/fs/nilfs2/btree.c b/fs/nilfs2/btree.c index 8fc73d0a923c..57ec6af28b49 100644 --- a/fs/nilfs2/btree.c +++ b/fs/nilfs2/btree.c | |||
@@ -685,7 +685,8 @@ static int nilfs_btree_lookup(const struct nilfs_bmap *btree, | |||
685 | } | 685 | } |
686 | 686 | ||
687 | static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, | 687 | static int nilfs_btree_lookup_contig(const struct nilfs_bmap *btree, |
688 | __u64 key, __u64 *ptrp, unsigned maxblocks) | 688 | __u64 key, __u64 *ptrp, |
689 | unsigned int maxblocks) | ||
689 | { | 690 | { |
690 | struct nilfs_btree_path *path; | 691 | struct nilfs_btree_path *path; |
691 | struct nilfs_btree_node *node; | 692 | struct nilfs_btree_node *node; |
diff --git a/fs/nilfs2/cpfile.c b/fs/nilfs2/cpfile.c index 16f884bd857c..b61c3e0eb342 100644 --- a/fs/nilfs2/cpfile.c +++ b/fs/nilfs2/cpfile.c | |||
@@ -431,7 +431,8 @@ static void nilfs_cpfile_checkpoint_to_cpinfo(struct inode *cpfile, | |||
431 | } | 431 | } |
432 | 432 | ||
433 | static ssize_t nilfs_cpfile_do_get_cpinfo(struct inode *cpfile, __u64 *cnop, | 433 | static ssize_t nilfs_cpfile_do_get_cpinfo(struct inode *cpfile, __u64 *cnop, |
434 | void *buf, unsigned cisz, size_t nci) | 434 | void *buf, unsigned int cisz, |
435 | size_t nci) | ||
435 | { | 436 | { |
436 | struct nilfs_checkpoint *cp; | 437 | struct nilfs_checkpoint *cp; |
437 | struct nilfs_cpinfo *ci = buf; | 438 | struct nilfs_cpinfo *ci = buf; |
@@ -482,7 +483,8 @@ static ssize_t nilfs_cpfile_do_get_cpinfo(struct inode *cpfile, __u64 *cnop, | |||
482 | } | 483 | } |
483 | 484 | ||
484 | static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop, | 485 | static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop, |
485 | void *buf, unsigned cisz, size_t nci) | 486 | void *buf, unsigned int cisz, |
487 | size_t nci) | ||
486 | { | 488 | { |
487 | struct buffer_head *bh; | 489 | struct buffer_head *bh; |
488 | struct nilfs_cpfile_header *header; | 490 | struct nilfs_cpfile_header *header; |
@@ -568,7 +570,7 @@ static ssize_t nilfs_cpfile_do_get_ssinfo(struct inode *cpfile, __u64 *cnop, | |||
568 | */ | 570 | */ |
569 | 571 | ||
570 | ssize_t nilfs_cpfile_get_cpinfo(struct inode *cpfile, __u64 *cnop, int mode, | 572 | ssize_t nilfs_cpfile_get_cpinfo(struct inode *cpfile, __u64 *cnop, int mode, |
571 | void *buf, unsigned cisz, size_t nci) | 573 | void *buf, unsigned int cisz, size_t nci) |
572 | { | 574 | { |
573 | switch (mode) { | 575 | switch (mode) { |
574 | case NILFS_CHECKPOINT: | 576 | case NILFS_CHECKPOINT: |
diff --git a/fs/nilfs2/cpfile.h b/fs/nilfs2/cpfile.h index 5bdb8262928b..0249744ae234 100644 --- a/fs/nilfs2/cpfile.h +++ b/fs/nilfs2/cpfile.h | |||
@@ -33,8 +33,8 @@ int nilfs_cpfile_delete_checkpoint(struct inode *, __u64); | |||
33 | int nilfs_cpfile_change_cpmode(struct inode *, __u64, int); | 33 | int nilfs_cpfile_change_cpmode(struct inode *, __u64, int); |
34 | int nilfs_cpfile_is_snapshot(struct inode *, __u64); | 34 | int nilfs_cpfile_is_snapshot(struct inode *, __u64); |
35 | int nilfs_cpfile_get_stat(struct inode *, struct nilfs_cpstat *); | 35 | int nilfs_cpfile_get_stat(struct inode *, struct nilfs_cpstat *); |
36 | ssize_t nilfs_cpfile_get_cpinfo(struct inode *, __u64 *, int, void *, unsigned, | 36 | ssize_t nilfs_cpfile_get_cpinfo(struct inode *, __u64 *, int, void *, |
37 | size_t); | 37 | unsigned int, size_t); |
38 | 38 | ||
39 | int nilfs_cpfile_read(struct super_block *sb, size_t cpsize, | 39 | int nilfs_cpfile_read(struct super_block *sb, size_t cpsize, |
40 | struct nilfs_inode *raw_inode, struct inode **inodep); | 40 | struct nilfs_inode *raw_inode, struct inode **inodep); |
diff --git a/fs/nilfs2/dat.c b/fs/nilfs2/dat.c index e92257bc42ee..7367610ea807 100644 --- a/fs/nilfs2/dat.c +++ b/fs/nilfs2/dat.c | |||
@@ -424,7 +424,7 @@ int nilfs_dat_translate(struct inode *dat, __u64 vblocknr, sector_t *blocknrp) | |||
424 | return ret; | 424 | return ret; |
425 | } | 425 | } |
426 | 426 | ||
427 | ssize_t nilfs_dat_get_vinfo(struct inode *dat, void *buf, unsigned visz, | 427 | ssize_t nilfs_dat_get_vinfo(struct inode *dat, void *buf, unsigned int visz, |
428 | size_t nvi) | 428 | size_t nvi) |
429 | { | 429 | { |
430 | struct buffer_head *entry_bh; | 430 | struct buffer_head *entry_bh; |
diff --git a/fs/nilfs2/dat.h b/fs/nilfs2/dat.h index c7035b5b1aed..abbfdabcabea 100644 --- a/fs/nilfs2/dat.h +++ b/fs/nilfs2/dat.h | |||
@@ -47,7 +47,7 @@ void nilfs_dat_abort_update(struct inode *, struct nilfs_palloc_req *, | |||
47 | int nilfs_dat_mark_dirty(struct inode *, __u64); | 47 | int nilfs_dat_mark_dirty(struct inode *, __u64); |
48 | int nilfs_dat_freev(struct inode *, __u64 *, size_t); | 48 | int nilfs_dat_freev(struct inode *, __u64 *, size_t); |
49 | int nilfs_dat_move(struct inode *, __u64, sector_t); | 49 | int nilfs_dat_move(struct inode *, __u64, sector_t); |
50 | ssize_t nilfs_dat_get_vinfo(struct inode *, void *, unsigned, size_t); | 50 | ssize_t nilfs_dat_get_vinfo(struct inode *, void *, unsigned int, size_t); |
51 | 51 | ||
52 | int nilfs_dat_read(struct super_block *sb, size_t entry_size, | 52 | int nilfs_dat_read(struct super_block *sb, size_t entry_size, |
53 | struct nilfs_inode *raw_inode, struct inode **inodep); | 53 | struct nilfs_inode *raw_inode, struct inode **inodep); |
diff --git a/fs/nilfs2/dir.c b/fs/nilfs2/dir.c index bbcc03de1e74..e506f4f7120a 100644 --- a/fs/nilfs2/dir.c +++ b/fs/nilfs2/dir.c | |||
@@ -46,7 +46,7 @@ | |||
46 | * nilfs uses block-sized chunks. Arguably, sector-sized ones would be | 46 | * nilfs uses block-sized chunks. Arguably, sector-sized ones would be |
47 | * more robust, but we have what we have | 47 | * more robust, but we have what we have |
48 | */ | 48 | */ |
49 | static inline unsigned nilfs_chunk_size(struct inode *inode) | 49 | static inline unsigned int nilfs_chunk_size(struct inode *inode) |
50 | { | 50 | { |
51 | return inode->i_sb->s_blocksize; | 51 | return inode->i_sb->s_blocksize; |
52 | } | 52 | } |
@@ -61,9 +61,9 @@ static inline void nilfs_put_page(struct page *page) | |||
61 | * Return the offset into page `page_nr' of the last valid | 61 | * Return the offset into page `page_nr' of the last valid |
62 | * byte in that page, plus one. | 62 | * byte in that page, plus one. |
63 | */ | 63 | */ |
64 | static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr) | 64 | static unsigned int nilfs_last_byte(struct inode *inode, unsigned long page_nr) |
65 | { | 65 | { |
66 | unsigned last_byte = inode->i_size; | 66 | unsigned int last_byte = inode->i_size; |
67 | 67 | ||
68 | last_byte -= page_nr << PAGE_SHIFT; | 68 | last_byte -= page_nr << PAGE_SHIFT; |
69 | if (last_byte > PAGE_SIZE) | 69 | if (last_byte > PAGE_SIZE) |
@@ -71,7 +71,8 @@ static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr) | |||
71 | return last_byte; | 71 | return last_byte; |
72 | } | 72 | } |
73 | 73 | ||
74 | static int nilfs_prepare_chunk(struct page *page, unsigned from, unsigned to) | 74 | static int nilfs_prepare_chunk(struct page *page, unsigned int from, |
75 | unsigned int to) | ||
75 | { | 76 | { |
76 | loff_t pos = page_offset(page) + from; | 77 | loff_t pos = page_offset(page) + from; |
77 | 78 | ||
@@ -80,12 +81,12 @@ static int nilfs_prepare_chunk(struct page *page, unsigned from, unsigned to) | |||
80 | 81 | ||
81 | static void nilfs_commit_chunk(struct page *page, | 82 | static void nilfs_commit_chunk(struct page *page, |
82 | struct address_space *mapping, | 83 | struct address_space *mapping, |
83 | unsigned from, unsigned to) | 84 | unsigned int from, unsigned int to) |
84 | { | 85 | { |
85 | struct inode *dir = mapping->host; | 86 | struct inode *dir = mapping->host; |
86 | loff_t pos = page_offset(page) + from; | 87 | loff_t pos = page_offset(page) + from; |
87 | unsigned len = to - from; | 88 | unsigned int len = to - from; |
88 | unsigned nr_dirty, copied; | 89 | unsigned int nr_dirty, copied; |
89 | int err; | 90 | int err; |
90 | 91 | ||
91 | nr_dirty = nilfs_page_count_clean_buffers(page, from, to); | 92 | nr_dirty = nilfs_page_count_clean_buffers(page, from, to); |
@@ -103,10 +104,10 @@ static bool nilfs_check_page(struct page *page) | |||
103 | { | 104 | { |
104 | struct inode *dir = page->mapping->host; | 105 | struct inode *dir = page->mapping->host; |
105 | struct super_block *sb = dir->i_sb; | 106 | struct super_block *sb = dir->i_sb; |
106 | unsigned chunk_size = nilfs_chunk_size(dir); | 107 | unsigned int chunk_size = nilfs_chunk_size(dir); |
107 | char *kaddr = page_address(page); | 108 | char *kaddr = page_address(page); |
108 | unsigned offs, rec_len; | 109 | unsigned int offs, rec_len; |
109 | unsigned limit = PAGE_SIZE; | 110 | unsigned int limit = PAGE_SIZE; |
110 | struct nilfs_dir_entry *p; | 111 | struct nilfs_dir_entry *p; |
111 | char *error; | 112 | char *error; |
112 | 113 | ||
@@ -256,7 +257,6 @@ static int nilfs_readdir(struct file *file, struct dir_context *ctx) | |||
256 | unsigned int offset = pos & ~PAGE_MASK; | 257 | unsigned int offset = pos & ~PAGE_MASK; |
257 | unsigned long n = pos >> PAGE_SHIFT; | 258 | unsigned long n = pos >> PAGE_SHIFT; |
258 | unsigned long npages = dir_pages(inode); | 259 | unsigned long npages = dir_pages(inode); |
259 | /* unsigned chunk_mask = ~(nilfs_chunk_size(inode)-1); */ | ||
260 | 260 | ||
261 | if (pos > inode->i_size - NILFS_DIR_REC_LEN(1)) | 261 | if (pos > inode->i_size - NILFS_DIR_REC_LEN(1)) |
262 | return 0; | 262 | return 0; |
@@ -318,7 +318,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr, | |||
318 | { | 318 | { |
319 | const unsigned char *name = qstr->name; | 319 | const unsigned char *name = qstr->name; |
320 | int namelen = qstr->len; | 320 | int namelen = qstr->len; |
321 | unsigned reclen = NILFS_DIR_REC_LEN(namelen); | 321 | unsigned int reclen = NILFS_DIR_REC_LEN(namelen); |
322 | unsigned long start, n; | 322 | unsigned long start, n; |
323 | unsigned long npages = dir_pages(dir); | 323 | unsigned long npages = dir_pages(dir); |
324 | struct page *page = NULL; | 324 | struct page *page = NULL; |
@@ -408,8 +408,8 @@ ino_t nilfs_inode_by_name(struct inode *dir, const struct qstr *qstr) | |||
408 | void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, | 408 | void nilfs_set_link(struct inode *dir, struct nilfs_dir_entry *de, |
409 | struct page *page, struct inode *inode) | 409 | struct page *page, struct inode *inode) |
410 | { | 410 | { |
411 | unsigned from = (char *) de - (char *) page_address(page); | 411 | unsigned int from = (char *)de - (char *)page_address(page); |
412 | unsigned to = from + nilfs_rec_len_from_disk(de->rec_len); | 412 | unsigned int to = from + nilfs_rec_len_from_disk(de->rec_len); |
413 | struct address_space *mapping = page->mapping; | 413 | struct address_space *mapping = page->mapping; |
414 | int err; | 414 | int err; |
415 | 415 | ||
@@ -431,15 +431,15 @@ int nilfs_add_link(struct dentry *dentry, struct inode *inode) | |||
431 | struct inode *dir = d_inode(dentry->d_parent); | 431 | struct inode *dir = d_inode(dentry->d_parent); |
432 | const unsigned char *name = dentry->d_name.name; | 432 | const unsigned char *name = dentry->d_name.name; |
433 | int namelen = dentry->d_name.len; | 433 | int namelen = dentry->d_name.len; |
434 | unsigned chunk_size = nilfs_chunk_size(dir); | 434 | unsigned int chunk_size = nilfs_chunk_size(dir); |
435 | unsigned reclen = NILFS_DIR_REC_LEN(namelen); | 435 | unsigned int reclen = NILFS_DIR_REC_LEN(namelen); |
436 | unsigned short rec_len, name_len; | 436 | unsigned short rec_len, name_len; |
437 | struct page *page = NULL; | 437 | struct page *page = NULL; |
438 | struct nilfs_dir_entry *de; | 438 | struct nilfs_dir_entry *de; |
439 | unsigned long npages = dir_pages(dir); | 439 | unsigned long npages = dir_pages(dir); |
440 | unsigned long n; | 440 | unsigned long n; |
441 | char *kaddr; | 441 | char *kaddr; |
442 | unsigned from, to; | 442 | unsigned int from, to; |
443 | int err; | 443 | int err; |
444 | 444 | ||
445 | /* | 445 | /* |
@@ -531,13 +531,14 @@ int nilfs_delete_entry(struct nilfs_dir_entry *dir, struct page *page) | |||
531 | struct address_space *mapping = page->mapping; | 531 | struct address_space *mapping = page->mapping; |
532 | struct inode *inode = mapping->host; | 532 | struct inode *inode = mapping->host; |
533 | char *kaddr = page_address(page); | 533 | char *kaddr = page_address(page); |
534 | unsigned from = ((char *)dir - kaddr) & ~(nilfs_chunk_size(inode) - 1); | 534 | unsigned int from, to; |
535 | unsigned to = ((char *)dir - kaddr) + | 535 | struct nilfs_dir_entry *de, *pde = NULL; |
536 | nilfs_rec_len_from_disk(dir->rec_len); | ||
537 | struct nilfs_dir_entry *pde = NULL; | ||
538 | struct nilfs_dir_entry *de = (struct nilfs_dir_entry *)(kaddr + from); | ||
539 | int err; | 536 | int err; |
540 | 537 | ||
538 | from = ((char *)dir - kaddr) & ~(nilfs_chunk_size(inode) - 1); | ||
539 | to = ((char *)dir - kaddr) + nilfs_rec_len_from_disk(dir->rec_len); | ||
540 | de = (struct nilfs_dir_entry *)(kaddr + from); | ||
541 | |||
541 | while ((char *)de < (char *)dir) { | 542 | while ((char *)de < (char *)dir) { |
542 | if (de->rec_len == 0) { | 543 | if (de->rec_len == 0) { |
543 | nilfs_error(inode->i_sb, __func__, | 544 | nilfs_error(inode->i_sb, __func__, |
@@ -570,7 +571,7 @@ int nilfs_make_empty(struct inode *inode, struct inode *parent) | |||
570 | { | 571 | { |
571 | struct address_space *mapping = inode->i_mapping; | 572 | struct address_space *mapping = inode->i_mapping; |
572 | struct page *page = grab_cache_page(mapping, 0); | 573 | struct page *page = grab_cache_page(mapping, 0); |
573 | unsigned chunk_size = nilfs_chunk_size(inode); | 574 | unsigned int chunk_size = nilfs_chunk_size(inode); |
574 | struct nilfs_dir_entry *de; | 575 | struct nilfs_dir_entry *de; |
575 | int err; | 576 | int err; |
576 | void *kaddr; | 577 | void *kaddr; |
diff --git a/fs/nilfs2/direct.c b/fs/nilfs2/direct.c index 22058d0b36e9..001068630063 100644 --- a/fs/nilfs2/direct.c +++ b/fs/nilfs2/direct.c | |||
@@ -58,7 +58,7 @@ static int nilfs_direct_lookup(const struct nilfs_bmap *direct, | |||
58 | 58 | ||
59 | static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, | 59 | static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, |
60 | __u64 key, __u64 *ptrp, | 60 | __u64 key, __u64 *ptrp, |
61 | unsigned maxblocks) | 61 | unsigned int maxblocks) |
62 | { | 62 | { |
63 | struct inode *dat = NULL; | 63 | struct inode *dat = NULL; |
64 | __u64 ptr, ptr2; | 64 | __u64 ptr, ptr2; |
@@ -79,7 +79,8 @@ static int nilfs_direct_lookup_contig(const struct nilfs_bmap *direct, | |||
79 | ptr = blocknr; | 79 | ptr = blocknr; |
80 | } | 80 | } |
81 | 81 | ||
82 | maxblocks = min_t(unsigned, maxblocks, NILFS_DIRECT_KEY_MAX - key + 1); | 82 | maxblocks = min_t(unsigned int, maxblocks, |
83 | NILFS_DIRECT_KEY_MAX - key + 1); | ||
83 | for (cnt = 1; cnt < maxblocks && | 84 | for (cnt = 1; cnt < maxblocks && |
84 | (ptr2 = nilfs_direct_get_ptr(direct, key + cnt)) != | 85 | (ptr2 = nilfs_direct_get_ptr(direct, key + cnt)) != |
85 | NILFS_BMAP_INVALID_PTR; | 86 | NILFS_BMAP_INVALID_PTR; |
diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c index bbb47e8bde3e..83d2c485efba 100644 --- a/fs/nilfs2/inode.c +++ b/fs/nilfs2/inode.c | |||
@@ -83,7 +83,7 @@ int nilfs_get_block(struct inode *inode, sector_t blkoff, | |||
83 | struct the_nilfs *nilfs = inode->i_sb->s_fs_info; | 83 | struct the_nilfs *nilfs = inode->i_sb->s_fs_info; |
84 | __u64 blknum = 0; | 84 | __u64 blknum = 0; |
85 | int err = 0, ret; | 85 | int err = 0, ret; |
86 | unsigned maxblocks = bh_result->b_size >> inode->i_blkbits; | 86 | unsigned int maxblocks = bh_result->b_size >> inode->i_blkbits; |
87 | 87 | ||
88 | down_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); | 88 | down_read(&NILFS_MDT(nilfs->ns_dat)->mi_sem); |
89 | ret = nilfs_bmap_lookup_contig(ii->i_bmap, blkoff, &blknum, maxblocks); | 89 | ret = nilfs_bmap_lookup_contig(ii->i_bmap, blkoff, &blknum, maxblocks); |
@@ -163,7 +163,7 @@ static int nilfs_readpage(struct file *file, struct page *page) | |||
163 | * @nr_pages - number of pages to be read | 163 | * @nr_pages - number of pages to be read |
164 | */ | 164 | */ |
165 | static int nilfs_readpages(struct file *file, struct address_space *mapping, | 165 | static int nilfs_readpages(struct file *file, struct address_space *mapping, |
166 | struct list_head *pages, unsigned nr_pages) | 166 | struct list_head *pages, unsigned int nr_pages) |
167 | { | 167 | { |
168 | return mpage_readpages(mapping, pages, nr_pages, nilfs_get_block); | 168 | return mpage_readpages(mapping, pages, nr_pages, nilfs_get_block); |
169 | } | 169 | } |
@@ -222,7 +222,7 @@ static int nilfs_set_page_dirty(struct page *page) | |||
222 | int ret = __set_page_dirty_nobuffers(page); | 222 | int ret = __set_page_dirty_nobuffers(page); |
223 | 223 | ||
224 | if (page_has_buffers(page)) { | 224 | if (page_has_buffers(page)) { |
225 | unsigned nr_dirty = 0; | 225 | unsigned int nr_dirty = 0; |
226 | struct buffer_head *bh, *head; | 226 | struct buffer_head *bh, *head; |
227 | 227 | ||
228 | /* | 228 | /* |
@@ -245,7 +245,7 @@ static int nilfs_set_page_dirty(struct page *page) | |||
245 | if (nr_dirty) | 245 | if (nr_dirty) |
246 | nilfs_set_file_dirty(inode, nr_dirty); | 246 | nilfs_set_file_dirty(inode, nr_dirty); |
247 | } else if (ret) { | 247 | } else if (ret) { |
248 | unsigned nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits); | 248 | unsigned int nr_dirty = 1 << (PAGE_SHIFT - inode->i_blkbits); |
249 | 249 | ||
250 | nilfs_set_file_dirty(inode, nr_dirty); | 250 | nilfs_set_file_dirty(inode, nr_dirty); |
251 | } | 251 | } |
@@ -287,8 +287,8 @@ static int nilfs_write_end(struct file *file, struct address_space *mapping, | |||
287 | struct page *page, void *fsdata) | 287 | struct page *page, void *fsdata) |
288 | { | 288 | { |
289 | struct inode *inode = mapping->host; | 289 | struct inode *inode = mapping->host; |
290 | unsigned start = pos & (PAGE_SIZE - 1); | 290 | unsigned int start = pos & (PAGE_SIZE - 1); |
291 | unsigned nr_dirty; | 291 | unsigned int nr_dirty; |
292 | int err; | 292 | int err; |
293 | 293 | ||
294 | nr_dirty = nilfs_page_count_clean_buffers(page, start, | 294 | nr_dirty = nilfs_page_count_clean_buffers(page, start, |
@@ -902,7 +902,7 @@ int nilfs_inode_dirty(struct inode *inode) | |||
902 | return ret; | 902 | return ret; |
903 | } | 903 | } |
904 | 904 | ||
905 | int nilfs_set_file_dirty(struct inode *inode, unsigned nr_dirty) | 905 | int nilfs_set_file_dirty(struct inode *inode, unsigned int nr_dirty) |
906 | { | 906 | { |
907 | struct nilfs_inode_info *ii = NILFS_I(inode); | 907 | struct nilfs_inode_info *ii = NILFS_I(inode); |
908 | struct the_nilfs *nilfs = inode->i_sb->s_fs_info; | 908 | struct the_nilfs *nilfs = inode->i_sb->s_fs_info; |
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 8a2f8b240f25..3417d859a03c 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -490,8 +490,8 @@ void nilfs_mdt_destroy(struct inode *inode) | |||
490 | kfree(mdi); | 490 | kfree(mdi); |
491 | } | 491 | } |
492 | 492 | ||
493 | void nilfs_mdt_set_entry_size(struct inode *inode, unsigned entry_size, | 493 | void nilfs_mdt_set_entry_size(struct inode *inode, unsigned int entry_size, |
494 | unsigned header_size) | 494 | unsigned int header_size) |
495 | { | 495 | { |
496 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); | 496 | struct nilfs_mdt_info *mi = NILFS_MDT(inode); |
497 | 497 | ||
diff --git a/fs/nilfs2/mdt.h b/fs/nilfs2/mdt.h index ffb876e6efed..3f67f3932097 100644 --- a/fs/nilfs2/mdt.h +++ b/fs/nilfs2/mdt.h | |||
@@ -53,8 +53,8 @@ struct nilfs_shadow_map { | |||
53 | struct nilfs_mdt_info { | 53 | struct nilfs_mdt_info { |
54 | struct rw_semaphore mi_sem; | 54 | struct rw_semaphore mi_sem; |
55 | struct blockgroup_lock *mi_bgl; | 55 | struct blockgroup_lock *mi_bgl; |
56 | unsigned mi_entry_size; | 56 | unsigned int mi_entry_size; |
57 | unsigned mi_first_entry_offset; | 57 | unsigned int mi_first_entry_offset; |
58 | unsigned long mi_entries_per_block; | 58 | unsigned long mi_entries_per_block; |
59 | struct nilfs_palloc_cache *mi_palloc_cache; | 59 | struct nilfs_palloc_cache *mi_palloc_cache; |
60 | struct nilfs_shadow_map *mi_shadow; | 60 | struct nilfs_shadow_map *mi_shadow; |
@@ -90,7 +90,7 @@ int nilfs_mdt_init(struct inode *inode, gfp_t gfp_mask, size_t objsz); | |||
90 | void nilfs_mdt_clear(struct inode *inode); | 90 | void nilfs_mdt_clear(struct inode *inode); |
91 | void nilfs_mdt_destroy(struct inode *inode); | 91 | void nilfs_mdt_destroy(struct inode *inode); |
92 | 92 | ||
93 | void nilfs_mdt_set_entry_size(struct inode *, unsigned, unsigned); | 93 | void nilfs_mdt_set_entry_size(struct inode *, unsigned int, unsigned int); |
94 | 94 | ||
95 | int nilfs_mdt_setup_shadow_map(struct inode *inode, | 95 | int nilfs_mdt_setup_shadow_map(struct inode *inode, |
96 | struct nilfs_shadow_map *shadow); | 96 | struct nilfs_shadow_map *shadow); |
diff --git a/fs/nilfs2/namei.c b/fs/nilfs2/namei.c index 8f8070cffa58..1ec8ae5995a5 100644 --- a/fs/nilfs2/namei.c +++ b/fs/nilfs2/namei.c | |||
@@ -139,7 +139,7 @@ static int nilfs_symlink(struct inode *dir, struct dentry *dentry, | |||
139 | { | 139 | { |
140 | struct nilfs_transaction_info ti; | 140 | struct nilfs_transaction_info ti; |
141 | struct super_block *sb = dir->i_sb; | 141 | struct super_block *sb = dir->i_sb; |
142 | unsigned l = strlen(symname)+1; | 142 | unsigned int l = strlen(symname) + 1; |
143 | struct inode *inode; | 143 | struct inode *inode; |
144 | int err; | 144 | int err; |
145 | 145 | ||
diff --git a/fs/nilfs2/nilfs.h b/fs/nilfs2/nilfs.h index fa179d4e5dba..ea320315d557 100644 --- a/fs/nilfs2/nilfs.h +++ b/fs/nilfs2/nilfs.h | |||
@@ -274,7 +274,7 @@ extern void nilfs_write_failed(struct address_space *mapping, loff_t to); | |||
274 | int nilfs_permission(struct inode *inode, int mask); | 274 | int nilfs_permission(struct inode *inode, int mask); |
275 | int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh); | 275 | int nilfs_load_inode_block(struct inode *inode, struct buffer_head **pbh); |
276 | extern int nilfs_inode_dirty(struct inode *); | 276 | extern int nilfs_inode_dirty(struct inode *); |
277 | int nilfs_set_file_dirty(struct inode *inode, unsigned nr_dirty); | 277 | int nilfs_set_file_dirty(struct inode *inode, unsigned int nr_dirty); |
278 | extern int __nilfs_mark_inode_dirty(struct inode *, int); | 278 | extern int __nilfs_mark_inode_dirty(struct inode *, int); |
279 | extern void nilfs_dirty_inode(struct inode *, int flags); | 279 | extern void nilfs_dirty_inode(struct inode *, int flags); |
280 | int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, | 280 | int nilfs_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 19687139f197..d97ba5f11b77 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -435,12 +435,12 @@ void nilfs_clear_dirty_page(struct page *page, bool silent) | |||
435 | __nilfs_clear_page_dirty(page); | 435 | __nilfs_clear_page_dirty(page); |
436 | } | 436 | } |
437 | 437 | ||
438 | unsigned nilfs_page_count_clean_buffers(struct page *page, | 438 | unsigned int nilfs_page_count_clean_buffers(struct page *page, |
439 | unsigned from, unsigned to) | 439 | unsigned int from, unsigned int to) |
440 | { | 440 | { |
441 | unsigned block_start, block_end; | 441 | unsigned int block_start, block_end; |
442 | struct buffer_head *bh, *head; | 442 | struct buffer_head *bh, *head; |
443 | unsigned nc = 0; | 443 | unsigned int nc = 0; |
444 | 444 | ||
445 | for (bh = head = page_buffers(page), block_start = 0; | 445 | for (bh = head = page_buffers(page), block_start = 0; |
446 | bh != head || !block_start; | 446 | bh != head || !block_start; |
diff --git a/fs/nilfs2/page.h b/fs/nilfs2/page.h index 041f2dc5e634..f3687c958fa8 100644 --- a/fs/nilfs2/page.h +++ b/fs/nilfs2/page.h | |||
@@ -53,7 +53,8 @@ void nilfs_copy_back_pages(struct address_space *, struct address_space *); | |||
53 | void nilfs_clear_dirty_page(struct page *, bool); | 53 | void nilfs_clear_dirty_page(struct page *, bool); |
54 | void nilfs_clear_dirty_pages(struct address_space *, bool); | 54 | void nilfs_clear_dirty_pages(struct address_space *, bool); |
55 | void nilfs_mapping_init(struct address_space *mapping, struct inode *inode); | 55 | void nilfs_mapping_init(struct address_space *mapping, struct inode *inode); |
56 | unsigned nilfs_page_count_clean_buffers(struct page *, unsigned, unsigned); | 56 | unsigned int nilfs_page_count_clean_buffers(struct page *, unsigned int, |
57 | unsigned int); | ||
57 | unsigned long nilfs_find_uncommitted_extent(struct inode *inode, | 58 | unsigned long nilfs_find_uncommitted_extent(struct inode *inode, |
58 | sector_t start_blk, | 59 | sector_t start_blk, |
59 | sector_t *blkoff); | 60 | sector_t *blkoff); |
diff --git a/fs/nilfs2/recovery.c b/fs/nilfs2/recovery.c index 685fa73cecd0..db156a199149 100644 --- a/fs/nilfs2/recovery.c +++ b/fs/nilfs2/recovery.c | |||
@@ -152,7 +152,7 @@ int nilfs_read_super_root_block(struct the_nilfs *nilfs, sector_t sr_block, | |||
152 | 152 | ||
153 | sr = (struct nilfs_super_root *)bh_sr->b_data; | 153 | sr = (struct nilfs_super_root *)bh_sr->b_data; |
154 | if (check) { | 154 | if (check) { |
155 | unsigned bytes = le16_to_cpu(sr->sr_bytes); | 155 | unsigned int bytes = le16_to_cpu(sr->sr_bytes); |
156 | 156 | ||
157 | if (bytes == 0 || bytes > nilfs->ns_blocksize) { | 157 | if (bytes == 0 || bytes > nilfs->ns_blocksize) { |
158 | ret = NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT; | 158 | ret = NILFS_SEG_FAIL_CHECKSUM_SUPER_ROOT; |
@@ -504,7 +504,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs, | |||
504 | { | 504 | { |
505 | struct inode *inode; | 505 | struct inode *inode; |
506 | struct nilfs_recovery_block *rb, *n; | 506 | struct nilfs_recovery_block *rb, *n; |
507 | unsigned blocksize = nilfs->ns_blocksize; | 507 | unsigned int blocksize = nilfs->ns_blocksize; |
508 | struct page *page; | 508 | struct page *page; |
509 | loff_t pos; | 509 | loff_t pos; |
510 | int err = 0, err2 = 0; | 510 | int err = 0, err2 = 0; |
diff --git a/fs/nilfs2/segbuf.c b/fs/nilfs2/segbuf.c index 52f6a6c8bab1..bf36df10540b 100644 --- a/fs/nilfs2/segbuf.c +++ b/fs/nilfs2/segbuf.c | |||
@@ -129,7 +129,7 @@ int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *segbuf, | |||
129 | return 0; | 129 | return 0; |
130 | } | 130 | } |
131 | 131 | ||
132 | int nilfs_segbuf_reset(struct nilfs_segment_buffer *segbuf, unsigned flags, | 132 | int nilfs_segbuf_reset(struct nilfs_segment_buffer *segbuf, unsigned int flags, |
133 | time_t ctime, __u64 cno) | 133 | time_t ctime, __u64 cno) |
134 | { | 134 | { |
135 | int err; | 135 | int err; |
@@ -236,7 +236,7 @@ nilfs_segbuf_fill_in_super_root_crc(struct nilfs_segment_buffer *segbuf, | |||
236 | { | 236 | { |
237 | struct nilfs_super_root *raw_sr; | 237 | struct nilfs_super_root *raw_sr; |
238 | struct the_nilfs *nilfs = segbuf->sb_super->s_fs_info; | 238 | struct the_nilfs *nilfs = segbuf->sb_super->s_fs_info; |
239 | unsigned srsize; | 239 | unsigned int srsize; |
240 | u32 crc; | 240 | u32 crc; |
241 | 241 | ||
242 | raw_sr = (struct nilfs_super_root *)segbuf->sb_super_root->b_data; | 242 | raw_sr = (struct nilfs_super_root *)segbuf->sb_super_root->b_data; |
diff --git a/fs/nilfs2/segbuf.h b/fs/nilfs2/segbuf.h index fc3a0fe3119c..7bbccc099709 100644 --- a/fs/nilfs2/segbuf.h +++ b/fs/nilfs2/segbuf.h | |||
@@ -78,7 +78,7 @@ struct nilfs_segment_buffer { | |||
78 | __u64 sb_nextnum; | 78 | __u64 sb_nextnum; |
79 | sector_t sb_fseg_start, sb_fseg_end; | 79 | sector_t sb_fseg_start, sb_fseg_end; |
80 | sector_t sb_pseg_start; | 80 | sector_t sb_pseg_start; |
81 | unsigned sb_rest_blocks; | 81 | unsigned int sb_rest_blocks; |
82 | 82 | ||
83 | /* Buffers */ | 83 | /* Buffers */ |
84 | struct list_head sb_segsum_buffers; | 84 | struct list_head sb_segsum_buffers; |
@@ -120,7 +120,8 @@ void nilfs_segbuf_map_cont(struct nilfs_segment_buffer *segbuf, | |||
120 | struct nilfs_segment_buffer *prev); | 120 | struct nilfs_segment_buffer *prev); |
121 | void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64, | 121 | void nilfs_segbuf_set_next_segnum(struct nilfs_segment_buffer *, __u64, |
122 | struct the_nilfs *); | 122 | struct the_nilfs *); |
123 | int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned, time_t, __u64); | 123 | int nilfs_segbuf_reset(struct nilfs_segment_buffer *, unsigned int, time_t, |
124 | __u64); | ||
124 | int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *); | 125 | int nilfs_segbuf_extend_segsum(struct nilfs_segment_buffer *); |
125 | int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *, | 126 | int nilfs_segbuf_extend_payload(struct nilfs_segment_buffer *, |
126 | struct buffer_head **); | 127 | struct buffer_head **); |
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c index a6ef1eb15edb..97dee069be83 100644 --- a/fs/nilfs2/segment.c +++ b/fs/nilfs2/segment.c | |||
@@ -393,10 +393,10 @@ static void nilfs_transaction_unlock(struct super_block *sb) | |||
393 | 393 | ||
394 | static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci, | 394 | static void *nilfs_segctor_map_segsum_entry(struct nilfs_sc_info *sci, |
395 | struct nilfs_segsum_pointer *ssp, | 395 | struct nilfs_segsum_pointer *ssp, |
396 | unsigned bytes) | 396 | unsigned int bytes) |
397 | { | 397 | { |
398 | struct nilfs_segment_buffer *segbuf = sci->sc_curseg; | 398 | struct nilfs_segment_buffer *segbuf = sci->sc_curseg; |
399 | unsigned blocksize = sci->sc_super->s_blocksize; | 399 | unsigned int blocksize = sci->sc_super->s_blocksize; |
400 | void *p; | 400 | void *p; |
401 | 401 | ||
402 | if (unlikely(ssp->offset + bytes > blocksize)) { | 402 | if (unlikely(ssp->offset + bytes > blocksize)) { |
@@ -418,8 +418,8 @@ static int nilfs_segctor_reset_segment_buffer(struct nilfs_sc_info *sci) | |||
418 | { | 418 | { |
419 | struct nilfs_segment_buffer *segbuf = sci->sc_curseg; | 419 | struct nilfs_segment_buffer *segbuf = sci->sc_curseg; |
420 | struct buffer_head *sumbh; | 420 | struct buffer_head *sumbh; |
421 | unsigned sumbytes; | 421 | unsigned int sumbytes; |
422 | unsigned flags = 0; | 422 | unsigned int flags = 0; |
423 | int err; | 423 | int err; |
424 | 424 | ||
425 | if (nilfs_doing_gc()) | 425 | if (nilfs_doing_gc()) |
@@ -468,9 +468,9 @@ static int nilfs_segctor_add_super_root(struct nilfs_sc_info *sci) | |||
468 | */ | 468 | */ |
469 | static int nilfs_segctor_segsum_block_required( | 469 | static int nilfs_segctor_segsum_block_required( |
470 | struct nilfs_sc_info *sci, const struct nilfs_segsum_pointer *ssp, | 470 | struct nilfs_sc_info *sci, const struct nilfs_segsum_pointer *ssp, |
471 | unsigned binfo_size) | 471 | unsigned int binfo_size) |
472 | { | 472 | { |
473 | unsigned blocksize = sci->sc_super->s_blocksize; | 473 | unsigned int blocksize = sci->sc_super->s_blocksize; |
474 | /* Size of finfo and binfo is enough small against blocksize */ | 474 | /* Size of finfo and binfo is enough small against blocksize */ |
475 | 475 | ||
476 | return ssp->offset + binfo_size + | 476 | return ssp->offset + binfo_size + |
@@ -529,7 +529,7 @@ static void nilfs_segctor_end_finfo(struct nilfs_sc_info *sci, | |||
529 | static int nilfs_segctor_add_file_block(struct nilfs_sc_info *sci, | 529 | static int nilfs_segctor_add_file_block(struct nilfs_sc_info *sci, |
530 | struct buffer_head *bh, | 530 | struct buffer_head *bh, |
531 | struct inode *inode, | 531 | struct inode *inode, |
532 | unsigned binfo_size) | 532 | unsigned int binfo_size) |
533 | { | 533 | { |
534 | struct nilfs_segment_buffer *segbuf; | 534 | struct nilfs_segment_buffer *segbuf; |
535 | int required, err = 0; | 535 | int required, err = 0; |
@@ -773,7 +773,7 @@ static void nilfs_dispose_list(struct the_nilfs *nilfs, | |||
773 | { | 773 | { |
774 | struct nilfs_inode_info *ii, *n; | 774 | struct nilfs_inode_info *ii, *n; |
775 | struct nilfs_inode_info *ivec[SC_N_INODEVEC], **pii; | 775 | struct nilfs_inode_info *ivec[SC_N_INODEVEC], **pii; |
776 | unsigned nv = 0; | 776 | unsigned int nv = 0; |
777 | 777 | ||
778 | while (!list_empty(head)) { | 778 | while (!list_empty(head)) { |
779 | spin_lock(&nilfs->ns_inode_lock); | 779 | spin_lock(&nilfs->ns_inode_lock); |
@@ -954,7 +954,7 @@ static void nilfs_segctor_fill_in_super_root(struct nilfs_sc_info *sci, | |||
954 | { | 954 | { |
955 | struct buffer_head *bh_sr; | 955 | struct buffer_head *bh_sr; |
956 | struct nilfs_super_root *raw_sr; | 956 | struct nilfs_super_root *raw_sr; |
957 | unsigned isz, srsz; | 957 | unsigned int isz, srsz; |
958 | 958 | ||
959 | bh_sr = NILFS_LAST_SEGBUF(&sci->sc_segbufs)->sb_super_root; | 959 | bh_sr = NILFS_LAST_SEGBUF(&sci->sc_segbufs)->sb_super_root; |
960 | raw_sr = (struct nilfs_super_root *)bh_sr->b_data; | 960 | raw_sr = (struct nilfs_super_root *)bh_sr->b_data; |
diff --git a/fs/nilfs2/segment.h b/fs/nilfs2/segment.h index 6cb12dbee7c1..27822e760d3f 100644 --- a/fs/nilfs2/segment.h +++ b/fs/nilfs2/segment.h | |||
@@ -71,7 +71,7 @@ struct nilfs_recovery_info { | |||
71 | */ | 71 | */ |
72 | struct nilfs_cstage { | 72 | struct nilfs_cstage { |
73 | int scnt; | 73 | int scnt; |
74 | unsigned flags; | 74 | unsigned int flags; |
75 | struct nilfs_inode_info *dirty_file_ptr; | 75 | struct nilfs_inode_info *dirty_file_ptr; |
76 | struct nilfs_inode_info *gc_inode_ptr; | 76 | struct nilfs_inode_info *gc_inode_ptr; |
77 | }; | 77 | }; |
@@ -80,7 +80,7 @@ struct nilfs_segment_buffer; | |||
80 | 80 | ||
81 | struct nilfs_segsum_pointer { | 81 | struct nilfs_segsum_pointer { |
82 | struct buffer_head *bh; | 82 | struct buffer_head *bh; |
83 | unsigned offset; /* offset in bytes */ | 83 | unsigned int offset; /* offset in bytes */ |
84 | }; | 84 | }; |
85 | 85 | ||
86 | /** | 86 | /** |
diff --git a/fs/nilfs2/sysfs.c b/fs/nilfs2/sysfs.c index 3e7d85335adf..8ffa42b704d8 100644 --- a/fs/nilfs2/sysfs.c +++ b/fs/nilfs2/sysfs.c | |||
@@ -756,7 +756,7 @@ nilfs_superblock_sb_write_count_show(struct nilfs_superblock_attr *attr, | |||
756 | struct the_nilfs *nilfs, | 756 | struct the_nilfs *nilfs, |
757 | char *buf) | 757 | char *buf) |
758 | { | 758 | { |
759 | unsigned sbwcount; | 759 | unsigned int sbwcount; |
760 | 760 | ||
761 | down_read(&nilfs->ns_sem); | 761 | down_read(&nilfs->ns_sem); |
762 | sbwcount = nilfs->ns_sbwcount; | 762 | sbwcount = nilfs->ns_sbwcount; |
@@ -770,7 +770,7 @@ nilfs_superblock_sb_update_frequency_show(struct nilfs_superblock_attr *attr, | |||
770 | struct the_nilfs *nilfs, | 770 | struct the_nilfs *nilfs, |
771 | char *buf) | 771 | char *buf) |
772 | { | 772 | { |
773 | unsigned sb_update_freq; | 773 | unsigned int sb_update_freq; |
774 | 774 | ||
775 | down_read(&nilfs->ns_sem); | 775 | down_read(&nilfs->ns_sem); |
776 | sb_update_freq = nilfs->ns_sb_update_freq; | 776 | sb_update_freq = nilfs->ns_sb_update_freq; |
@@ -784,7 +784,7 @@ nilfs_superblock_sb_update_frequency_store(struct nilfs_superblock_attr *attr, | |||
784 | struct the_nilfs *nilfs, | 784 | struct the_nilfs *nilfs, |
785 | const char *buf, size_t count) | 785 | const char *buf, size_t count) |
786 | { | 786 | { |
787 | unsigned val; | 787 | unsigned int val; |
788 | int err; | 788 | int err; |
789 | 789 | ||
790 | err = kstrtouint(skip_spaces(buf), 0, &val); | 790 | err = kstrtouint(skip_spaces(buf), 0, &val); |
diff --git a/fs/nilfs2/the_nilfs.c b/fs/nilfs2/the_nilfs.c index ba4b8189c342..b9e19ca3c96e 100644 --- a/fs/nilfs2/the_nilfs.c +++ b/fs/nilfs2/the_nilfs.c | |||
@@ -108,8 +108,8 @@ static int nilfs_load_super_root(struct the_nilfs *nilfs, | |||
108 | struct nilfs_super_root *raw_sr; | 108 | struct nilfs_super_root *raw_sr; |
109 | struct nilfs_super_block **sbp = nilfs->ns_sbp; | 109 | struct nilfs_super_block **sbp = nilfs->ns_sbp; |
110 | struct nilfs_inode *rawi; | 110 | struct nilfs_inode *rawi; |
111 | unsigned dat_entry_size, segment_usage_size, checkpoint_size; | 111 | unsigned int dat_entry_size, segment_usage_size, checkpoint_size; |
112 | unsigned inode_size; | 112 | unsigned int inode_size; |
113 | int err; | 113 | int err; |
114 | 114 | ||
115 | err = nilfs_read_super_root_block(nilfs, sr_block, &bh_sr, 1); | 115 | err = nilfs_read_super_root_block(nilfs, sr_block, &bh_sr, 1); |
diff --git a/fs/nilfs2/the_nilfs.h b/fs/nilfs2/the_nilfs.h index 62bd7b10fe43..06d2548d436d 100644 --- a/fs/nilfs2/the_nilfs.h +++ b/fs/nilfs2/the_nilfs.h | |||
@@ -114,10 +114,10 @@ struct the_nilfs { | |||
114 | struct buffer_head *ns_sbh[2]; | 114 | struct buffer_head *ns_sbh[2]; |
115 | struct nilfs_super_block *ns_sbp[2]; | 115 | struct nilfs_super_block *ns_sbp[2]; |
116 | time_t ns_sbwtime; | 116 | time_t ns_sbwtime; |
117 | unsigned ns_sbwcount; | 117 | unsigned int ns_sbwcount; |
118 | unsigned ns_sbsize; | 118 | unsigned int ns_sbsize; |
119 | unsigned ns_mount_state; | 119 | unsigned int ns_mount_state; |
120 | unsigned ns_sb_update_freq; | 120 | unsigned int ns_sb_update_freq; |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * Following fields are dedicated to a writable FS-instance. | 123 | * Following fields are dedicated to a writable FS-instance. |
@@ -306,7 +306,7 @@ static inline void nilfs_get_root(struct nilfs_root *root) | |||
306 | 306 | ||
307 | static inline int nilfs_valid_fs(struct the_nilfs *nilfs) | 307 | static inline int nilfs_valid_fs(struct the_nilfs *nilfs) |
308 | { | 308 | { |
309 | unsigned valid_fs; | 309 | unsigned int valid_fs; |
310 | 310 | ||
311 | down_read(&nilfs->ns_sem); | 311 | down_read(&nilfs->ns_sem); |
312 | valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS); | 312 | valid_fs = (nilfs->ns_mount_state & NILFS_VALID_FS); |
diff --git a/include/linux/nilfs2_fs.h b/include/linux/nilfs2_fs.h index 823d63d61081..3b584925d0e8 100644 --- a/include/linux/nilfs2_fs.h +++ b/include/linux/nilfs2_fs.h | |||
@@ -322,9 +322,9 @@ enum { | |||
322 | ~NILFS_DIR_ROUND) | 322 | ~NILFS_DIR_ROUND) |
323 | #define NILFS_MAX_REC_LEN ((1<<16)-1) | 323 | #define NILFS_MAX_REC_LEN ((1<<16)-1) |
324 | 324 | ||
325 | static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | 325 | static inline unsigned int nilfs_rec_len_from_disk(__le16 dlen) |
326 | { | 326 | { |
327 | unsigned len = le16_to_cpu(dlen); | 327 | unsigned int len = le16_to_cpu(dlen); |
328 | 328 | ||
329 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) | 329 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) |
330 | if (len == NILFS_MAX_REC_LEN) | 330 | if (len == NILFS_MAX_REC_LEN) |
@@ -333,7 +333,7 @@ static inline unsigned nilfs_rec_len_from_disk(__le16 dlen) | |||
333 | return len; | 333 | return len; |
334 | } | 334 | } |
335 | 335 | ||
336 | static inline __le16 nilfs_rec_len_to_disk(unsigned len) | 336 | static inline __le16 nilfs_rec_len_to_disk(unsigned int len) |
337 | { | 337 | { |
338 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) | 338 | #if !defined(__KERNEL__) || (PAGE_SIZE >= 65536) |
339 | if (len == (1 << 16)) | 339 | if (len == (1 << 16)) |