Skip to content

Commit

Permalink
nilfs2: add missing line spacing
Browse files Browse the repository at this point in the history
Clean up checkpatch.pl warnings "WARNING: Missing a blank line after
declarations" from nilfs2.

Link: http://lkml.kernel.org/r/1461935747-10380-11-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>
[modified for nilfs2-kmod6 tree]
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
konis committed May 24, 2016
1 parent 12c25ce commit a03aae2
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/nilfs2/cpfile.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ static unsigned long
nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
{
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;

do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
return (unsigned long)tcno;
}
Expand All @@ -46,6 +47,7 @@ static unsigned long
nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
{
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;

return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
}

Expand Down
3 changes: 3 additions & 0 deletions fs/nilfs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ static int nilfs_prepare_chunk_uninterruptible(struct page *page,
unsigned from, unsigned to)
{
loff_t pos = page_offset(page) + from;

return block_write_begin(NULL, mapping, pos, to - from,
AOP_FLAG_UNINTERRUPTIBLE, &page,
NULL, nilfs_get_block);
Expand All @@ -91,6 +92,7 @@ static int nilfs_prepare_chunk(struct page *page,
unsigned from, unsigned to)
{
loff_t pos = page_offset(page) + from;

return block_write_begin(NULL, mapping, pos, to - from, 0, &page,
NULL, nilfs_get_block);
}
Expand Down Expand Up @@ -366,6 +368,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr,
n = start;
do {
char *kaddr;

page = nilfs_get_page(dir, n);
if (!IS_ERR(page)) {
kaddr = page_address(page);
Expand Down
1 change: 1 addition & 0 deletions fs/nilfs2/ifile.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ static inline struct nilfs_inode *
nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh)
{
void *kaddr = kmap(ibh->b_page);

return nilfs_palloc_block_get_entry(ifile, ino, ibh, kaddr);
}

Expand Down
1 change: 1 addition & 0 deletions fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode)
{
int err = nilfs_add_link(dentry, inode);

if (!err) {
d_instantiate(dentry, inode);
unlock_new_inode(inode);
Expand Down
1 change: 1 addition & 0 deletions fs/nilfs2/segment.c
Original file line number Diff line number Diff line change
Expand Up @@ -2310,6 +2310,7 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode)
static void nilfs_construction_timeout(unsigned long data)
{
struct task_struct *p = (struct task_struct *)data;

wake_up_process(p);
}

Expand Down
2 changes: 2 additions & 0 deletions fs/nilfs2/sufile.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ static unsigned long
nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum)
{
__u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;

do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
return (unsigned long)t;
}
Expand All @@ -63,6 +64,7 @@ static unsigned long
nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum)
{
__u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;

return do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
}

Expand Down
1 change: 1 addition & 0 deletions fs/nilfs2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -794,6 +794,7 @@ static int parse_options(char *options, struct super_block *sb, int is_remount)

while ((p = strsep(&options, ",")) != NULL) {
int token;

if (!*p)
continue;

Expand Down
2 changes: 2 additions & 0 deletions fs/nilfs2/the_nilfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,12 +257,14 @@ struct nilfs_root {
static inline int nilfs_sb_need_update(struct the_nilfs *nilfs)
{
u64 t = get_seconds();

return t < nilfs->ns_sbwtime || t > nilfs->ns_sbwtime + NILFS_SB_FREQ;
}

static inline int nilfs_sb_will_flip(struct the_nilfs *nilfs)
{
int flip_bits = nilfs->ns_sbwcount & 0x0FL;

return (flip_bits != 0x08 && flip_bits != 0x0F);
}

Expand Down

0 comments on commit a03aae2

Please sign in to comment.