Commit 4ad364ca authored by Ryusuke Konishi's avatar Ryusuke Konishi Committed by Linus Torvalds

nilfs2: add missing line spacing

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.jpSigned-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent e7a142aa
...@@ -37,6 +37,7 @@ static unsigned long ...@@ -37,6 +37,7 @@ static unsigned long
nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno) nilfs_cpfile_get_blkoff(const struct inode *cpfile, __u64 cno)
{ {
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1; __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile)); do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
return (unsigned long)tcno; return (unsigned long)tcno;
} }
...@@ -46,6 +47,7 @@ static unsigned long ...@@ -46,6 +47,7 @@ static unsigned long
nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno) nilfs_cpfile_get_offset(const struct inode *cpfile, __u64 cno)
{ {
__u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1; __u64 tcno = cno + NILFS_MDT(cpfile)->mi_first_entry_offset - 1;
return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile)); return do_div(tcno, nilfs_cpfile_checkpoints_per_block(cpfile));
} }
......
...@@ -74,6 +74,7 @@ static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr) ...@@ -74,6 +74,7 @@ static unsigned nilfs_last_byte(struct inode *inode, unsigned long page_nr)
static int nilfs_prepare_chunk(struct page *page, unsigned from, unsigned to) static int nilfs_prepare_chunk(struct page *page, unsigned from, unsigned to)
{ {
loff_t pos = page_offset(page) + from; loff_t pos = page_offset(page) + from;
return __block_write_begin(page, pos, to - from, nilfs_get_block); return __block_write_begin(page, pos, to - from, nilfs_get_block);
} }
...@@ -336,6 +337,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr, ...@@ -336,6 +337,7 @@ nilfs_find_entry(struct inode *dir, const struct qstr *qstr,
n = start; n = start;
do { do {
char *kaddr; char *kaddr;
page = nilfs_get_page(dir, n); page = nilfs_get_page(dir, n);
if (!IS_ERR(page)) { if (!IS_ERR(page)) {
kaddr = page_address(page); kaddr = page_address(page);
......
...@@ -32,6 +32,7 @@ static inline struct nilfs_inode * ...@@ -32,6 +32,7 @@ static inline struct nilfs_inode *
nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh) nilfs_ifile_map_inode(struct inode *ifile, ino_t ino, struct buffer_head *ibh)
{ {
void *kaddr = kmap(ibh->b_page); void *kaddr = kmap(ibh->b_page);
return nilfs_palloc_block_get_entry(ifile, ino, ibh, kaddr); return nilfs_palloc_block_get_entry(ifile, ino, ibh, kaddr);
} }
......
...@@ -851,6 +851,7 @@ int nilfs_setattr(struct dentry *dentry, struct iattr *iattr) ...@@ -851,6 +851,7 @@ int nilfs_setattr(struct dentry *dentry, struct iattr *iattr)
int nilfs_permission(struct inode *inode, int mask) int nilfs_permission(struct inode *inode, int mask)
{ {
struct nilfs_root *root = NILFS_I(inode)->i_root; struct nilfs_root *root = NILFS_I(inode)->i_root;
if ((mask & MAY_WRITE) && root && if ((mask & MAY_WRITE) && root &&
root->cno != NILFS_CPTREE_CURRENT_CNO) root->cno != NILFS_CPTREE_CURRENT_CNO)
return -EROFS; /* snapshot is not writable */ return -EROFS; /* snapshot is not writable */
......
...@@ -44,6 +44,7 @@ ...@@ -44,6 +44,7 @@
static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode) static inline int nilfs_add_nondir(struct dentry *dentry, struct inode *inode)
{ {
int err = nilfs_add_link(dentry, inode); int err = nilfs_add_link(dentry, inode);
if (!err) { if (!err) {
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
unlock_new_inode(inode); unlock_new_inode(inode);
......
...@@ -522,6 +522,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs, ...@@ -522,6 +522,7 @@ static int nilfs_recover_dsync_blocks(struct the_nilfs *nilfs,
0, &page, nilfs_get_block); 0, &page, nilfs_get_block);
if (unlikely(err)) { if (unlikely(err)) {
loff_t isize = inode->i_size; loff_t isize = inode->i_size;
if (pos + blocksize > isize) if (pos + blocksize > isize)
nilfs_write_failed(inode->i_mapping, nilfs_write_failed(inode->i_mapping,
pos + blocksize); pos + blocksize);
......
...@@ -2391,6 +2391,7 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode) ...@@ -2391,6 +2391,7 @@ static int nilfs_segctor_construct(struct nilfs_sc_info *sci, int mode)
static void nilfs_construction_timeout(unsigned long data) static void nilfs_construction_timeout(unsigned long data)
{ {
struct task_struct *p = (struct task_struct *)data; struct task_struct *p = (struct task_struct *)data;
wake_up_process(p); wake_up_process(p);
} }
......
...@@ -57,6 +57,7 @@ static unsigned long ...@@ -57,6 +57,7 @@ static unsigned long
nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum) nilfs_sufile_get_blkoff(const struct inode *sufile, __u64 segnum)
{ {
__u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;
do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
return (unsigned long)t; return (unsigned long)t;
} }
...@@ -65,6 +66,7 @@ static unsigned long ...@@ -65,6 +66,7 @@ static unsigned long
nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum) nilfs_sufile_get_offset(const struct inode *sufile, __u64 segnum)
{ {
__u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset; __u64 t = segnum + NILFS_MDT(sufile)->mi_first_entry_offset;
return do_div(t, nilfs_sufile_segment_usages_per_block(sufile)); return do_div(t, nilfs_sufile_segment_usages_per_block(sufile));
} }
......
...@@ -743,6 +743,7 @@ static int parse_options(char *options, struct super_block *sb, int is_remount) ...@@ -743,6 +743,7 @@ static int parse_options(char *options, struct super_block *sb, int is_remount)
while ((p = strsep(&options, ",")) != NULL) { while ((p = strsep(&options, ",")) != NULL) {
int token; int token;
if (!*p) if (!*p)
continue; continue;
......
...@@ -269,6 +269,7 @@ struct nilfs_root { ...@@ -269,6 +269,7 @@ struct nilfs_root {
static inline int nilfs_sb_need_update(struct the_nilfs *nilfs) static inline int nilfs_sb_need_update(struct the_nilfs *nilfs)
{ {
u64 t = get_seconds(); u64 t = get_seconds();
return t < nilfs->ns_sbwtime || return t < nilfs->ns_sbwtime ||
t > nilfs->ns_sbwtime + nilfs->ns_sb_update_freq; t > nilfs->ns_sbwtime + nilfs->ns_sb_update_freq;
} }
...@@ -276,6 +277,7 @@ static inline int nilfs_sb_need_update(struct the_nilfs *nilfs) ...@@ -276,6 +277,7 @@ static inline int nilfs_sb_need_update(struct the_nilfs *nilfs)
static inline int nilfs_sb_will_flip(struct the_nilfs *nilfs) static inline int nilfs_sb_will_flip(struct the_nilfs *nilfs)
{ {
int flip_bits = nilfs->ns_sbwcount & 0x0FL; int flip_bits = nilfs->ns_sbwcount & 0x0FL;
return (flip_bits != 0x08 && flip_bits != 0x0F); return (flip_bits != 0x08 && flip_bits != 0x0F);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment