提交 907b9bce 编写于 作者: S Steven Whitehouse

[GFS2/DLM] Fix trailing whitespace

As per Andrew Morton's request, removed trailing whitespace.

Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: NSteven Whitehouse <swhiteho@redhat.com>
上级 7276b3b0
...@@ -1757,7 +1757,7 @@ static int do_unlock(struct dlm_rsb *r, struct dlm_lkb *lkb) ...@@ -1757,7 +1757,7 @@ static int do_unlock(struct dlm_rsb *r, struct dlm_lkb *lkb)
skip the queue_cast(ECANCEL). It indicates that the request/convert skip the queue_cast(ECANCEL). It indicates that the request/convert
completed (and queued a normal ast) just before the cancel; we don't completed (and queued a normal ast) just before the cancel; we don't
want to clobber the sb_result for the normal ast with ECANCEL. */ want to clobber the sb_result for the normal ast with ECANCEL. */
static int do_cancel(struct dlm_rsb *r, struct dlm_lkb *lkb) static int do_cancel(struct dlm_rsb *r, struct dlm_lkb *lkb)
{ {
revert_lock(r, lkb); revert_lock(r, lkb);
......
...@@ -181,7 +181,7 @@ int gfs2_check_acl(struct inode *inode, int mask) ...@@ -181,7 +181,7 @@ int gfs2_check_acl(struct inode *inode, int mask)
error = gfs2_check_acl_locked(inode, mask); error = gfs2_check_acl_locked(inode, mask);
gfs2_glock_dq_uninit(&i_gh); gfs2_glock_dq_uninit(&i_gh);
} }
return error; return error;
} }
......
...@@ -130,7 +130,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page) ...@@ -130,7 +130,7 @@ int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page)
error = gfs2_meta_inode_buffer(ip, &dibh); error = gfs2_meta_inode_buffer(ip, &dibh);
if (error) if (error)
goto out; goto out;
if (ip->i_di.di_size) { if (ip->i_di.di_size) {
/* Get a free block, fill it with the stuffed data, /* Get a free block, fill it with the stuffed data,
and write it out to disk */ and write it out to disk */
...@@ -246,7 +246,7 @@ static int build_height(struct inode *inode, unsigned height) ...@@ -246,7 +246,7 @@ static int build_height(struct inode *inode, unsigned height)
blocks[n] = gfs2_meta_new(ip->i_gl, bn); blocks[n] = gfs2_meta_new(ip->i_gl, bn);
gfs2_trans_add_bh(ip->i_gl, blocks[n], 1); gfs2_trans_add_bh(ip->i_gl, blocks[n], 1);
} }
n = 0; n = 0;
bn = blocks[0]->b_blocknr; bn = blocks[0]->b_blocknr;
if (new_height > 1) { if (new_height > 1) {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
/* This uses schedule_timeout() instead of msleep() because it's good for /* This uses schedule_timeout() instead of msleep() because it's good for
the daemons to wake up more often than the timeout when unmounting so the daemons to wake up more often than the timeout when unmounting so
the user's unmount doesn't sit there forever. the user's unmount doesn't sit there forever.
The kthread functions used to start these daemons block and flush signals. */ The kthread functions used to start these daemons block and flush signals. */
/** /**
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
#define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1) #define gfs2_disk_hash2offset(h) (((u64)(h)) >> 1)
#define gfs2_dir_offset2hash(p) ((u32)(((u64)(p)) << 1)) #define gfs2_dir_offset2hash(p) ((u32)(((u64)(p)) << 1))
typedef int (*leaf_call_t) (struct gfs2_inode *dip, u32 index, u32 len, typedef int (*leaf_call_t) (struct gfs2_inode *dip, u32 index, u32 len,
u64 leaf_no, void *data); u64 leaf_no, void *data);
typedef int (*gfs2_dscan_t)(const struct gfs2_dirent *dent, typedef int (*gfs2_dscan_t)(const struct gfs2_dirent *dent,
const struct qstr *name, void *opaque); const struct qstr *name, void *opaque);
...@@ -119,7 +119,6 @@ static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, u64 block, ...@@ -119,7 +119,6 @@ static int gfs2_dir_get_existing_buffer(struct gfs2_inode *ip, u64 block,
static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf, static int gfs2_dir_write_stuffed(struct gfs2_inode *ip, const char *buf,
unsigned int offset, unsigned int size) unsigned int offset, unsigned int size)
{ {
struct buffer_head *dibh; struct buffer_head *dibh;
int error; int error;
...@@ -685,7 +684,7 @@ static struct gfs2_dirent *gfs2_dirent_alloc(struct inode *inode, ...@@ -685,7 +684,7 @@ static struct gfs2_dirent *gfs2_dirent_alloc(struct inode *inode,
const struct qstr *name) const struct qstr *name)
{ {
struct gfs2_dirent *dent; struct gfs2_dirent *dent;
dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size, dent = gfs2_dirent_scan(inode, bh->b_data, bh->b_size,
gfs2_dirent_find_space, name, NULL); gfs2_dirent_find_space, name, NULL);
if (!dent || IS_ERR(dent)) if (!dent || IS_ERR(dent))
return dent; return dent;
...@@ -764,7 +763,7 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode, ...@@ -764,7 +763,7 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode,
gfs2_consist_inode(ip); gfs2_consist_inode(ip);
return ERR_PTR(-EIO); return ERR_PTR(-EIO);
} }
index = name->hash >> (32 - ip->i_di.di_depth); index = name->hash >> (32 - ip->i_di.di_depth);
error = get_first_leaf(ip, index, &bh); error = get_first_leaf(ip, index, &bh);
if (error) if (error)
...@@ -779,14 +778,14 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode, ...@@ -779,14 +778,14 @@ static struct gfs2_dirent *gfs2_dirent_search(struct inode *inode,
brelse(bh); brelse(bh);
if (!ln) if (!ln)
break; break;
error = get_leaf(ip, ln, &bh); error = get_leaf(ip, ln, &bh);
} while(!error); } while(!error);
return error ? ERR_PTR(error) : NULL; return error ? ERR_PTR(error) : NULL;
} }
error = gfs2_meta_inode_buffer(ip, &bh); error = gfs2_meta_inode_buffer(ip, &bh);
if (error) if (error)
return ERR_PTR(error); return ERR_PTR(error);
...@@ -810,7 +809,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh, ...@@ -810,7 +809,7 @@ static struct gfs2_leaf *new_leaf(struct inode *inode, struct buffer_head **pbh,
struct qstr name = { .name = "", .len = 0, .hash = 0 }; struct qstr name = { .name = "", .len = 0, .hash = 0 };
if (!bh) if (!bh)
return NULL; return NULL;
gfs2_trans_add_bh(ip->i_gl, bh, 1); gfs2_trans_add_bh(ip->i_gl, bh, 1);
gfs2_metatype_set(bh, GFS2_METATYPE_LF, GFS2_FORMAT_LF); gfs2_metatype_set(bh, GFS2_METATYPE_LF, GFS2_FORMAT_LF);
leaf = (struct gfs2_leaf *)bh->b_data; leaf = (struct gfs2_leaf *)bh->b_data;
......
...@@ -146,7 +146,7 @@ static int system_eo_set(struct gfs2_inode *ip, struct gfs2_ea_request *er) ...@@ -146,7 +146,7 @@ static int system_eo_set(struct gfs2_inode *ip, struct gfs2_ea_request *er)
if (error == -ENODATA) if (error == -ENODATA)
error = 0; error = 0;
} }
return error; return error;
} }
return -EPERM; return -EPERM;
......
...@@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el) ...@@ -1133,7 +1133,7 @@ static int ea_remove_stuffed(struct gfs2_inode *ip, struct gfs2_ea_location *el)
gfs2_trans_add_bh(ip->i_gl, dibh, 1); gfs2_trans_add_bh(ip->i_gl, dibh, 1);
gfs2_dinode_out(&ip->i_di, dibh->b_data); gfs2_dinode_out(&ip->i_di, dibh->b_data);
brelse(dibh); brelse(dibh);
} }
gfs2_trans_end(GFS2_SB(&ip->i_inode)); gfs2_trans_end(GFS2_SB(&ip->i_inode));
......
...@@ -371,7 +371,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number, ...@@ -371,7 +371,7 @@ int gfs2_glock_get(struct gfs2_sbd *sdp, u64 number,
if (gl->gl_aspace) if (gl->gl_aspace)
gfs2_aspace_put(gl->gl_aspace); gfs2_aspace_put(gl->gl_aspace);
fail: fail:
kmem_cache_free(gfs2_glock_cachep, gl); kmem_cache_free(gfs2_glock_cachep, gl);
return error; return error;
} }
...@@ -614,7 +614,7 @@ static int rq_greedy(struct gfs2_holder *gh) ...@@ -614,7 +614,7 @@ static int rq_greedy(struct gfs2_holder *gh)
gfs2_holder_uninit(gh); gfs2_holder_uninit(gh);
kfree(container_of(gh, struct greedy, gr_gh)); kfree(container_of(gh, struct greedy, gr_gh));
spin_lock(&gl->gl_spin); spin_lock(&gl->gl_spin);
return 0; return 0;
} }
...@@ -1184,11 +1184,11 @@ static void add_to_queue(struct gfs2_holder *gh) ...@@ -1184,11 +1184,11 @@ static void add_to_queue(struct gfs2_holder *gh)
if (existing) { if (existing) {
print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip); print_symbol(KERN_WARNING "original: %s\n", existing->gh_ip);
printk(KERN_INFO "pid : %d\n", existing->gh_owner->pid); printk(KERN_INFO "pid : %d\n", existing->gh_owner->pid);
printk(KERN_INFO "lock type : %d lock state : %d\n", printk(KERN_INFO "lock type : %d lock state : %d\n",
existing->gh_gl->gl_name.ln_type, existing->gh_gl->gl_state); existing->gh_gl->gl_name.ln_type, existing->gh_gl->gl_state);
print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip); print_symbol(KERN_WARNING "new: %s\n", gh->gh_ip);
printk(KERN_INFO "pid : %d\n", gh->gh_owner->pid); printk(KERN_INFO "pid : %d\n", gh->gh_owner->pid);
printk(KERN_INFO "lock type : %d lock state : %d\n", printk(KERN_INFO "lock type : %d lock state : %d\n",
gl->gl_name.ln_type, gl->gl_state); gl->gl_name.ln_type, gl->gl_state);
BUG(); BUG();
} }
...@@ -1203,7 +1203,7 @@ static void add_to_queue(struct gfs2_holder *gh) ...@@ -1203,7 +1203,7 @@ static void add_to_queue(struct gfs2_holder *gh)
if (gh->gh_flags & LM_FLAG_PRIORITY) if (gh->gh_flags & LM_FLAG_PRIORITY)
list_add(&gh->gh_list, &gl->gl_waiters3); list_add(&gh->gh_list, &gl->gl_waiters3);
else else
list_add_tail(&gh->gh_list, &gl->gl_waiters3); list_add_tail(&gh->gh_list, &gl->gl_waiters3);
} }
/** /**
...@@ -2003,7 +2003,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait) ...@@ -2003,7 +2003,7 @@ void gfs2_gl_hash_clear(struct gfs2_sbd *sdp, int wait)
for (;;) { for (;;) {
cont = 0; cont = 0;
for (x = 0; x < GFS2_GL_HASH_SIZE; x++) { for (x = 0; x < GFS2_GL_HASH_SIZE; x++) {
if (examine_bucket(clear_glock, sdp, x)) if (examine_bucket(clear_glock, sdp, x))
cont = 1; cont = 1;
} }
......
...@@ -386,7 +386,6 @@ struct inode *gfs2_lookup_simple(struct inode *dip, const char *name) ...@@ -386,7 +386,6 @@ struct inode *gfs2_lookup_simple(struct inode *dip, const char *name)
struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name,
int is_root, struct nameidata *nd) int is_root, struct nameidata *nd)
{ {
struct super_block *sb = dir->i_sb; struct super_block *sb = dir->i_sb;
struct gfs2_inode *dip = GFS2_I(dir); struct gfs2_inode *dip = GFS2_I(dir);
...@@ -491,7 +490,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, u64 *formal_ino) ...@@ -491,7 +490,7 @@ static int pick_formal_ino_2(struct gfs2_sbd *sdp, u64 *formal_ino)
error = gfs2_meta_inode_buffer(ip, &bh); error = gfs2_meta_inode_buffer(ip, &bh);
if (error) if (error)
goto out_end_trans; goto out_end_trans;
gfs2_inum_range_in(&ir, bh->b_data + sizeof(struct gfs2_dinode)); gfs2_inum_range_in(&ir, bh->b_data + sizeof(struct gfs2_dinode));
if (!ir.ir_length) { if (!ir.ir_length) {
...@@ -769,7 +768,7 @@ static int link_dinode(struct gfs2_inode *dip, const struct qstr *name, ...@@ -769,7 +768,7 @@ static int link_dinode(struct gfs2_inode *dip, const struct qstr *name,
error = gfs2_trans_begin(sdp, sdp->sd_max_dirres + error = gfs2_trans_begin(sdp, sdp->sd_max_dirres +
al->al_rgd->rd_ri.ri_length + al->al_rgd->rd_ri.ri_length +
2 * RES_DINODE + 2 * RES_DINODE +
RES_STATFS + RES_QUOTA, 0); RES_STATFS + RES_QUOTA, 0);
if (error) if (error)
goto fail_ipreserv; goto fail_ipreserv;
......
...@@ -34,7 +34,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip); ...@@ -34,7 +34,7 @@ int gfs2_inode_refresh(struct gfs2_inode *ip);
int gfs2_dinode_dealloc(struct gfs2_inode *inode); int gfs2_dinode_dealloc(struct gfs2_inode *inode);
int gfs2_change_nlink(struct gfs2_inode *ip, int diff); int gfs2_change_nlink(struct gfs2_inode *ip, int diff);
struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name, struct inode *gfs2_lookupi(struct inode *dir, const struct qstr *name,
int is_root, struct nameidata *nd); int is_root, struct nameidata *nd);
struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name, struct inode *gfs2_createi(struct gfs2_holder *ghs, const struct qstr *name,
unsigned int mode); unsigned int mode);
......
...@@ -106,7 +106,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...) ...@@ -106,7 +106,7 @@ int gfs2_lm_withdraw(struct gfs2_sbd *sdp, char *fmt, ...)
fs_err(sdp, "about to withdraw from the cluster\n"); fs_err(sdp, "about to withdraw from the cluster\n");
BUG_ON(sdp->sd_args.ar_debug); BUG_ON(sdp->sd_args.ar_debug);
fs_err(sdp, "waiting for outstanding I/O\n"); fs_err(sdp, "waiting for outstanding I/O\n");
......
...@@ -54,7 +54,7 @@ static void process_complete(struct gdlm_lock *lp) ...@@ -54,7 +54,7 @@ static void process_complete(struct gdlm_lock *lp)
if (lp->lksb.sb_status == -DLM_ECANCEL) { if (lp->lksb.sb_status == -DLM_ECANCEL) {
log_info("complete dlm cancel %x,%llx flags %lx", log_info("complete dlm cancel %x,%llx flags %lx",
lp->lockname.ln_type, lp->lockname.ln_type,
(unsigned long long)lp->lockname.ln_number, (unsigned long long)lp->lockname.ln_number,
lp->flags); lp->flags);
...@@ -102,7 +102,7 @@ static void process_complete(struct gdlm_lock *lp) ...@@ -102,7 +102,7 @@ static void process_complete(struct gdlm_lock *lp)
if (test_and_clear_bit(LFL_CANCEL, &lp->flags)) { if (test_and_clear_bit(LFL_CANCEL, &lp->flags)) {
log_info("complete internal cancel %x,%llx", log_info("complete internal cancel %x,%llx",
lp->lockname.ln_type, lp->lockname.ln_type,
(unsigned long long)lp->lockname.ln_number); (unsigned long long)lp->lockname.ln_number);
lp->req = lp->cur; lp->req = lp->cur;
acb.lc_ret |= LM_OUT_CANCELED; acb.lc_ret |= LM_OUT_CANCELED;
......
...@@ -420,7 +420,7 @@ static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le) ...@@ -420,7 +420,7 @@ static void rg_lo_add(struct gfs2_sbd *sdp, struct gfs2_log_element *le)
gfs2_log_lock(sdp); gfs2_log_lock(sdp);
sdp->sd_log_num_rg++; sdp->sd_log_num_rg++;
list_add(&le->le_list, &sdp->sd_log_le_rg); list_add(&le->le_list, &sdp->sd_log_le_rg);
gfs2_log_unlock(sdp); gfs2_log_unlock(sdp);
} }
static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) static void rg_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
......
...@@ -77,7 +77,7 @@ static int __init init_gfs2_fs(void) ...@@ -77,7 +77,7 @@ static int __init init_gfs2_fs(void)
error = -ENOMEM; error = -ENOMEM;
gfs2_glock_cachep = kmem_cache_create("gfs2_glock", gfs2_glock_cachep = kmem_cache_create("gfs2_glock",
sizeof(struct gfs2_glock), sizeof(struct gfs2_glock),
0, 0, 0, 0,
gfs2_init_glock_once, NULL); gfs2_init_glock_once, NULL);
if (!gfs2_glock_cachep) if (!gfs2_glock_cachep)
goto fail; goto fail;
......
...@@ -296,7 +296,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping, ...@@ -296,7 +296,7 @@ static int gfs2_readpages(struct file *file, struct address_space *mapping,
LM_FLAG_TRY_1CB|GL_ATIME|GL_AOP, &gh); LM_FLAG_TRY_1CB|GL_ATIME|GL_AOP, &gh);
do_unlock = 1; do_unlock = 1;
ret = gfs2_glock_nq_m_atime(1, &gh); ret = gfs2_glock_nq_m_atime(1, &gh);
if (ret == GLR_TRYFAILED) if (ret == GLR_TRYFAILED)
goto out_noerror; goto out_noerror;
if (unlikely(ret)) if (unlikely(ret))
goto out_unlock; goto out_unlock;
...@@ -681,7 +681,7 @@ static unsigned limit = 0; ...@@ -681,7 +681,7 @@ static unsigned limit = 0;
gl = bd->bd_gl; gl = bd->bd_gl;
fs_warn(sdp, "gl = (%u, %llu)\n", fs_warn(sdp, "gl = (%u, %llu)\n",
gl->gl_name.ln_type, (unsigned long long)gl->gl_name.ln_number); gl->gl_name.ln_type, (unsigned long long)gl->gl_name.ln_number);
fs_warn(sdp, "bd_list_tr = %s, bd_le.le_list = %s\n", fs_warn(sdp, "bd_list_tr = %s, bd_le.le_list = %s\n",
......
...@@ -236,7 +236,7 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr) ...@@ -236,7 +236,7 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr)
error = gfs2_glock_nq_m_atime(1, &gh); error = gfs2_glock_nq_m_atime(1, &gh);
if (error) if (error)
return error; return error;
iflags = iflags_cvt(gfs2_to_iflags, ip->i_di.di_flags); iflags = iflags_cvt(gfs2_to_iflags, ip->i_di.di_flags);
if (put_user(iflags, ptr)) if (put_user(iflags, ptr))
error = -EFAULT; error = -EFAULT;
...@@ -299,7 +299,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) ...@@ -299,7 +299,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask)
goto out; goto out;
if (IS_APPEND(inode) && (new_flags & GFS2_DIF_APPENDONLY)) if (IS_APPEND(inode) && (new_flags & GFS2_DIF_APPENDONLY))
goto out; goto out;
if (((new_flags ^ flags) & GFS2_DIF_IMMUTABLE) && if (((new_flags ^ flags) & GFS2_DIF_IMMUTABLE) &&
!capable(CAP_LINUX_IMMUTABLE)) !capable(CAP_LINUX_IMMUTABLE))
goto out; goto out;
if (!IS_IMMUTABLE(inode)) { if (!IS_IMMUTABLE(inode)) {
...@@ -541,7 +541,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl) ...@@ -541,7 +541,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
goto out; goto out;
gfs2_glock_hold(gl); gfs2_glock_hold(gl);
flock_lock_file_wait(file, flock_lock_file_wait(file,
&(struct file_lock){.fl_type = F_UNLCK}); &(struct file_lock){.fl_type = F_UNLCK});
gfs2_glock_dq_uninit(fl_gh); gfs2_glock_dq_uninit(fl_gh);
} else { } else {
error = gfs2_glock_get(GFS2_SB(&ip->i_inode), error = gfs2_glock_get(GFS2_SB(&ip->i_inode),
......
...@@ -146,7 +146,7 @@ static int init_names(struct gfs2_sbd *sdp, int silent) ...@@ -146,7 +146,7 @@ static int init_names(struct gfs2_sbd *sdp, int silent)
brelse(bh); brelse(bh);
return -ENOMEM; return -ENOMEM;
} }
gfs2_sb_in(sb, bh->b_data); gfs2_sb_in(sb, bh->b_data);
brelse(bh); brelse(bh);
error = gfs2_check_sb(sdp, sb, silent); error = gfs2_check_sb(sdp, sb, silent);
...@@ -272,7 +272,7 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo) ...@@ -272,7 +272,7 @@ static int init_sb(struct gfs2_sbd *sdp, int silent, int undo)
} }
return 0; return 0;
} }
error = gfs2_glock_nq_num(sdp, GFS2_SB_LOCK, &gfs2_meta_glops, error = gfs2_glock_nq_num(sdp, GFS2_SB_LOCK, &gfs2_meta_glops,
LM_ST_SHARED, 0, &sb_gh); LM_ST_SHARED, 0, &sb_gh);
if (error) { if (error) {
...@@ -358,7 +358,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo) ...@@ -358,7 +358,7 @@ static int init_journal(struct gfs2_sbd *sdp, int undo)
error = -EINVAL; error = -EINVAL;
if (!gfs2_jindex_size(sdp)) { if (!gfs2_jindex_size(sdp)) {
fs_err(sdp, "no journals!\n"); fs_err(sdp, "no journals!\n");
goto fail_jindex; goto fail_jindex;
} }
if (sdp->sd_args.ar_spectator) { if (sdp->sd_args.ar_spectator) {
...@@ -789,7 +789,7 @@ static int gfs2_get_sb(struct file_system_type *fs_type, int flags, ...@@ -789,7 +789,7 @@ static int gfs2_get_sb(struct file_system_type *fs_type, int flags,
return error; return error;
} }
static int fill_super_meta(struct super_block *sb, struct super_block *new, static int fill_super_meta(struct super_block *sb, struct super_block *new,
void *data, int silent) void *data, int silent)
{ {
struct gfs2_sbd *sdp = sb->s_fs_info; struct gfs2_sbd *sdp = sb->s_fs_info;
...@@ -821,7 +821,7 @@ static int set_bdev_super(struct super_block *s, void *data) ...@@ -821,7 +821,7 @@ static int set_bdev_super(struct super_block *s, void *data)
s->s_dev = s->s_bdev->bd_dev; s->s_dev = s->s_bdev->bd_dev;
return 0; return 0;
} }
static int test_bdev_super(struct super_block *s, void *data) static int test_bdev_super(struct super_block *s, void *data)
{ {
return s->s_bdev == data; return s->s_bdev == data;
...@@ -835,10 +835,10 @@ static struct super_block* get_gfs2_sb(const char *dev_name) ...@@ -835,10 +835,10 @@ static struct super_block* get_gfs2_sb(const char *dev_name)
struct super_block *sb = NULL, *s; struct super_block *sb = NULL, *s;
struct list_head *l; struct list_head *l;
int error; int error;
error = path_lookup(dev_name, LOOKUP_FOLLOW, &nd); error = path_lookup(dev_name, LOOKUP_FOLLOW, &nd);
if (error) { if (error) {
printk(KERN_WARNING "GFS2: path_lookup on %s returned error\n", printk(KERN_WARNING "GFS2: path_lookup on %s returned error\n",
dev_name); dev_name);
goto out; goto out;
} }
...@@ -900,9 +900,9 @@ static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags, ...@@ -900,9 +900,9 @@ static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags,
deactivate_super(new); deactivate_super(new);
goto error; goto error;
} }
new->s_flags |= MS_ACTIVE; new->s_flags |= MS_ACTIVE;
/* Grab a reference to the gfs2 mount point */ /* Grab a reference to the gfs2 mount point */
atomic_inc(&sdp->sd_gfs2mnt->mnt_count); atomic_inc(&sdp->sd_gfs2mnt->mnt_count);
return simple_set_mnt(mnt, new); return simple_set_mnt(mnt, new);
......
...@@ -522,7 +522,7 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode, ...@@ -522,7 +522,7 @@ static int gfs2_mknod(struct inode *dir, struct dentry *dentry, int mode,
case S_IFSOCK: case S_IFSOCK:
break; break;
default: default:
return -EOPNOTSUPP; return -EOPNOTSUPP;
}; };
gfs2_holder_init(dip->i_gl, 0, 0, ghs); gfs2_holder_init(dip->i_gl, 0, 0, ghs);
......
...@@ -367,7 +367,7 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) ...@@ -367,7 +367,7 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt)
return 0; return 0;
} }
/* /*
* We have to (at the moment) hold the inodes main lock to cover * We have to (at the moment) hold the inodes main lock to cover
* the gap between unlocking the shared lock on the iopen lock and * the gap between unlocking the shared lock on the iopen lock and
* taking the exclusive lock. I'd rather do a shared -> exclusive * taking the exclusive lock. I'd rather do a shared -> exclusive
......
...@@ -556,7 +556,7 @@ static void do_qc(struct gfs2_quota_data *qd, s64 change) ...@@ -556,7 +556,7 @@ static void do_qc(struct gfs2_quota_data *qd, s64 change)
qd_hold(qd); qd_hold(qd);
slot_hold(qd); slot_hold(qd);
} }
mutex_unlock(&sdp->sd_quota_mutex); mutex_unlock(&sdp->sd_quota_mutex);
} }
...@@ -777,7 +777,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh, ...@@ -777,7 +777,7 @@ static int do_glock(struct gfs2_quota_data *qd, int force_refresh,
gfs2_glock_dq_uninit(&i_gh); gfs2_glock_dq_uninit(&i_gh);
gfs2_quota_in(&q, buf); gfs2_quota_in(&q, buf);
qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb; qlvb = (struct gfs2_quota_lvb *)qd->qd_gl->gl_lvb;
qlvb->qb_magic = cpu_to_be32(GFS2_MAGIC); qlvb->qb_magic = cpu_to_be32(GFS2_MAGIC);
...@@ -1062,7 +1062,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp) ...@@ -1062,7 +1062,7 @@ int gfs2_quota_init(struct gfs2_sbd *sdp)
if (!ip->i_di.di_size || ip->i_di.di_size > (64 << 20) || if (!ip->i_di.di_size || ip->i_di.di_size > (64 << 20) ||
ip->i_di.di_size & (sdp->sd_sb.sb_bsize - 1)) { ip->i_di.di_size & (sdp->sd_sb.sb_bsize - 1)) {
gfs2_consist_inode(ip); gfs2_consist_inode(ip);
return -EIO; return -EIO;
} }
sdp->sd_quota_slots = blocks * sdp->sd_qc_per_block; sdp->sd_quota_slots = blocks * sdp->sd_qc_per_block;
sdp->sd_quota_chunks = DIV_ROUND_UP(sdp->sd_quota_slots, 8 * PAGE_SIZE); sdp->sd_quota_chunks = DIV_ROUND_UP(sdp->sd_quota_slots, 8 * PAGE_SIZE);
......
...@@ -444,11 +444,11 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd) ...@@ -444,11 +444,11 @@ int gfs2_recover_journal(struct gfs2_jdesc *jd)
switch (error) { switch (error) {
case 0: case 0:
break; break;
case GLR_TRYFAILED: case GLR_TRYFAILED:
fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid); fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid);
error = 0; error = 0;
default: default:
goto fail; goto fail;
}; };
......
...@@ -896,7 +896,7 @@ static int get_local_rgrp(struct gfs2_inode *ip) ...@@ -896,7 +896,7 @@ static int get_local_rgrp(struct gfs2_inode *ip)
rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc); rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc);
while (rgd) { while (rgd) {
error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE,
LM_FLAG_TRY, &al->al_rgd_gh); LM_FLAG_TRY, &al->al_rgd_gh);
switch (error) { switch (error) {
case 0: case 0:
......
...@@ -650,8 +650,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, ...@@ -650,8 +650,7 @@ void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free,
l_sc->sc_total += total; l_sc->sc_total += total;
l_sc->sc_free += free; l_sc->sc_free += free;
l_sc->sc_dinodes += dinodes; l_sc->sc_dinodes += dinodes;
gfs2_statfs_change_out(l_sc, l_bh->b_data + gfs2_statfs_change_out(l_sc, l_bh->b_data + sizeof(struct gfs2_dinode));
sizeof(struct gfs2_dinode));
spin_unlock(&sdp->sd_statfs_spin); spin_unlock(&sdp->sd_statfs_spin);
brelse(l_bh); brelse(l_bh);
...@@ -678,7 +677,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp) ...@@ -678,7 +677,7 @@ int gfs2_statfs_sync(struct gfs2_sbd *sdp)
spin_lock(&sdp->sd_statfs_spin); spin_lock(&sdp->sd_statfs_spin);
gfs2_statfs_change_in(m_sc, m_bh->b_data + gfs2_statfs_change_in(m_sc, m_bh->b_data +
sizeof(struct gfs2_dinode)); sizeof(struct gfs2_dinode));
if (!l_sc->sc_total && !l_sc->sc_free && !l_sc->sc_dinodes) { if (!l_sc->sc_total && !l_sc->sc_free && !l_sc->sc_dinodes) {
spin_unlock(&sdp->sd_statfs_spin); spin_unlock(&sdp->sd_statfs_spin);
goto out_bh; goto out_bh;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册