Commit defa220f authored by Oleg Drokin's avatar Oleg Drokin Committed by Greg Kroah-Hartman

staging/lustre: Fix indentation mistakes

none look like bugs or bugs-inducing, mostly just
off by a couple of spaces all around.
Signed-off-by: default avatarOleg Drokin <green@linuxhacker.ru>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent dadfcdab
...@@ -276,7 +276,7 @@ static inline int opcode_offset(__u32 opc) ...@@ -276,7 +276,7 @@ static inline int opcode_offset(__u32 opc)
OPC_RANGE(OST)); OPC_RANGE(OST));
} else if (opc < FLD_LAST_OPC) { } else if (opc < FLD_LAST_OPC) {
/* FLD opcode */ /* FLD opcode */
return (opc - FLD_FIRST_OPC + return (opc - FLD_FIRST_OPC +
OPC_RANGE(SEC) + OPC_RANGE(SEC) +
OPC_RANGE(SEQ) + OPC_RANGE(SEQ) +
OPC_RANGE(QUOTA) + OPC_RANGE(QUOTA) +
......
...@@ -700,9 +700,9 @@ static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid, ...@@ -700,9 +700,9 @@ static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid,
* of 1M objects/s/OST for 9 years, or combinations thereof. * of 1M objects/s/OST for 9 years, or combinations thereof.
*/ */
if (ostid_id(ostid) >= IDIF_MAX_OID) { if (ostid_id(ostid) >= IDIF_MAX_OID) {
CERROR("bad MDT0 id, "DOSTID" ost_idx:%u\n", CERROR("bad MDT0 id, " DOSTID " ost_idx:%u\n",
POSTID(ostid), ost_idx); POSTID(ostid), ost_idx);
return -EBADF; return -EBADF;
} }
fid->f_seq = fid_idif_seq(ostid_id(ostid), ost_idx); fid->f_seq = fid_idif_seq(ostid_id(ostid), ost_idx);
/* truncate to 32 bits by assignment */ /* truncate to 32 bits by assignment */
...@@ -3154,7 +3154,7 @@ static inline void lustre_get_wire_obdo(struct obd_connect_data *ocd, ...@@ -3154,7 +3154,7 @@ static inline void lustre_get_wire_obdo(struct obd_connect_data *ocd,
__u32 local_flags = 0; __u32 local_flags = 0;
if (lobdo->o_valid & OBD_MD_FLFLAGS) if (lobdo->o_valid & OBD_MD_FLFLAGS)
local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK; local_flags = lobdo->o_flags & OBD_FL_LOCAL_MASK;
*lobdo = *wobdo; *lobdo = *wobdo;
if (local_flags != 0) { if (local_flags != 0) {
......
...@@ -473,7 +473,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen) ...@@ -473,7 +473,7 @@ static inline void obd_uuid2fsname(char *buf, char *uuid, int buflen)
buf[buflen - 1] = '\0'; buf[buflen - 1] = '\0';
p = strrchr(buf, '-'); p = strrchr(buf, '-');
if (p) if (p)
*p = '\0'; *p = '\0';
} }
/* printf display format /* printf display format
......
...@@ -119,7 +119,7 @@ ll_fault_io_init(struct vm_area_struct *vma, struct lu_env **env_ret, ...@@ -119,7 +119,7 @@ ll_fault_io_init(struct vm_area_struct *vma, struct lu_env **env_ret,
*/ */
env = cl_env_nested_get(nest); env = cl_env_nested_get(nest);
if (IS_ERR(env)) if (IS_ERR(env))
return ERR_PTR(-EINVAL); return ERR_PTR(-EINVAL);
*env_ret = env; *env_ret = env;
......
...@@ -381,9 +381,9 @@ static int index_in_window(unsigned long index, unsigned long point, ...@@ -381,9 +381,9 @@ static int index_in_window(unsigned long index, unsigned long point,
unsigned long start = point - before, end = point + after; unsigned long start = point - before, end = point + after;
if (start > point) if (start > point)
start = 0; start = 0;
if (end < point) if (end < point)
end = ~0; end = ~0;
return start <= index && index <= end; return start <= index && index <= end;
} }
......
...@@ -248,7 +248,7 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io, ...@@ -248,7 +248,7 @@ ssize_t ll_direct_rw_pages(const struct lu_env *env, struct cl_io *io,
cl_2queue_init(queue); cl_2queue_init(queue);
for (i = 0; i < page_count; i++) { for (i = 0; i < page_count; i++) {
if (pv->ldp_offsets) if (pv->ldp_offsets)
file_offset = pv->ldp_offsets[i]; file_offset = pv->ldp_offsets[i];
LASSERT(!(file_offset & (page_size - 1))); LASSERT(!(file_offset & (page_size - 1)));
clp = cl_page_find(env, obj, cl_index(obj, file_offset), clp = cl_page_find(env, obj, cl_index(obj, file_offset),
......
...@@ -779,9 +779,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg) ...@@ -779,9 +779,9 @@ int lov_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
if (desc->ld_magic != LOV_DESC_MAGIC) { if (desc->ld_magic != LOV_DESC_MAGIC) {
if (desc->ld_magic == __swab32(LOV_DESC_MAGIC)) { if (desc->ld_magic == __swab32(LOV_DESC_MAGIC)) {
CDEBUG(D_OTHER, "%s: Swabbing lov desc %p\n", CDEBUG(D_OTHER, "%s: Swabbing lov desc %p\n",
obd->obd_name, desc); obd->obd_name, desc);
lustre_swab_lov_desc(desc); lustre_swab_lov_desc(desc);
} else { } else {
CERROR("%s: Bad lov desc magic: %#x\n", CERROR("%s: Bad lov desc magic: %#x\n",
obd->obd_name, desc->ld_magic); obd->obd_name, desc->ld_magic);
...@@ -1051,7 +1051,7 @@ static int lov_create(const struct lu_env *env, struct obd_export *exp, ...@@ -1051,7 +1051,7 @@ static int lov_create(const struct lu_env *env, struct obd_export *exp,
/* Recreate a specific object id at the given OST index */ /* Recreate a specific object id at the given OST index */
if ((src_oa->o_valid & OBD_MD_FLFLAGS) && if ((src_oa->o_valid & OBD_MD_FLFLAGS) &&
(src_oa->o_flags & OBD_FL_RECREATE_OBJS)) { (src_oa->o_flags & OBD_FL_RECREATE_OBJS)) {
rc = lov_recreate(exp, src_oa, ea, oti); rc = lov_recreate(exp, src_oa, ea, oti);
} }
obd_putref(exp->exp_obd); obd_putref(exp->exp_obd);
......
...@@ -228,7 +228,7 @@ static void *pool_proc_start(struct seq_file *s, loff_t *pos) ...@@ -228,7 +228,7 @@ static void *pool_proc_start(struct seq_file *s, loff_t *pos)
i = 0; i = 0;
do { do {
ptr = pool_proc_next(s, &iter, &i); ptr = pool_proc_next(s, &iter, &i);
} while ((i < *pos) && ptr); } while ((i < *pos) && ptr);
return ptr; return ptr;
} }
......
...@@ -329,32 +329,31 @@ static void cl_io_locks_sort(struct cl_io *io) ...@@ -329,32 +329,31 @@ static void cl_io_locks_sort(struct cl_io *io)
int cl_queue_match(const struct list_head *queue, int cl_queue_match(const struct list_head *queue,
const struct cl_lock_descr *need) const struct cl_lock_descr *need)
{ {
struct cl_io_lock_link *scan; struct cl_io_lock_link *scan;
list_for_each_entry(scan, queue, cill_linkage) { list_for_each_entry(scan, queue, cill_linkage) {
if (cl_lock_descr_match(&scan->cill_descr, need)) if (cl_lock_descr_match(&scan->cill_descr, need))
return 1; return 1;
} }
return 0; return 0;
} }
EXPORT_SYMBOL(cl_queue_match); EXPORT_SYMBOL(cl_queue_match);
static int cl_queue_merge(const struct list_head *queue, static int cl_queue_merge(const struct list_head *queue,
const struct cl_lock_descr *need) const struct cl_lock_descr *need)
{ {
struct cl_io_lock_link *scan; struct cl_io_lock_link *scan;
list_for_each_entry(scan, queue, cill_linkage) {
if (cl_lock_descr_cmp(&scan->cill_descr, need))
continue;
cl_lock_descr_merge(&scan->cill_descr, need);
CDEBUG(D_VFSTRACE, "lock: %d: [%lu, %lu]\n",
scan->cill_descr.cld_mode, scan->cill_descr.cld_start,
scan->cill_descr.cld_end);
return 1;
}
return 0;
list_for_each_entry(scan, queue, cill_linkage) {
if (cl_lock_descr_cmp(&scan->cill_descr, need))
continue;
cl_lock_descr_merge(&scan->cill_descr, need);
CDEBUG(D_VFSTRACE, "lock: %d: [%lu, %lu]\n",
scan->cill_descr.cld_mode, scan->cill_descr.cld_start,
scan->cill_descr.cld_end);
return 1;
}
return 0;
} }
static int cl_lockset_match(const struct cl_lockset *set, static int cl_lockset_match(const struct cl_lockset *set,
...@@ -916,14 +915,14 @@ int cl_io_submit_sync(const struct lu_env *env, struct cl_io *io, ...@@ -916,14 +915,14 @@ int cl_io_submit_sync(const struct lu_env *env, struct cl_io *io,
* clean pages), count them as completed to avoid infinite * clean pages), count them as completed to avoid infinite
* wait. * wait.
*/ */
cl_page_list_for_each(pg, &queue->c2_qin) { cl_page_list_for_each(pg, &queue->c2_qin) {
pg->cp_sync_io = NULL; pg->cp_sync_io = NULL;
cl_sync_io_note(anchor, 1); cl_sync_io_note(anchor, 1);
} }
/* wait for the IO to be finished. */ /* wait for the IO to be finished. */
rc = cl_sync_io_wait(env, io, &queue->c2_qout, rc = cl_sync_io_wait(env, io, &queue->c2_qout,
anchor, timeout); anchor, timeout);
} else { } else {
LASSERT(list_empty(&queue->c2_qout.pl_pages)); LASSERT(list_empty(&queue->c2_qout.pl_pages));
cl_page_list_for_each(pg, &queue->c2_qin) cl_page_list_for_each(pg, &queue->c2_qin)
......
...@@ -577,7 +577,7 @@ EXPORT_SYMBOL(lprocfs_stats_collect); ...@@ -577,7 +577,7 @@ EXPORT_SYMBOL(lprocfs_stats_collect);
#define flag2str(flag, first) \ #define flag2str(flag, first) \
do { \ do { \
if (imp->imp_##flag) \ if (imp->imp_##flag) \
seq_printf(m, "%s" #flag, first ? "" : ", "); \ seq_printf(m, "%s" #flag, first ? "" : ", "); \
} while (0) } while (0)
static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m) static int obd_import_flags2str(struct obd_import *imp, struct seq_file *m)
{ {
......
...@@ -1038,7 +1038,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, ...@@ -1038,7 +1038,7 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars,
* can pass it down the stack * can pass it down the stack
*/ */
if (strnchr(key, keylen, '.')) if (strnchr(key, keylen, '.'))
return -ENOSYS; return -ENOSYS;
CERROR("%s: unknown param %s\n", CERROR("%s: unknown param %s\n",
(char *)lustre_cfg_string(lcfg, 0), key); (char *)lustre_cfg_string(lcfg, 0), key);
/* rc = -EINVAL; continue parsing other params */ /* rc = -EINVAL; continue parsing other params */
......
...@@ -422,8 +422,8 @@ static ssize_t osc_checksum_type_seq_write(struct file *file, ...@@ -422,8 +422,8 @@ static ssize_t osc_checksum_type_seq_write(struct file *file,
if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0) if (((1 << i) & obd->u.cli.cl_supp_cksum_types) == 0)
continue; continue;
if (!strcmp(kernbuf, cksum_name[i])) { if (!strcmp(kernbuf, cksum_name[i])) {
obd->u.cli.cl_cksum_type = 1 << i; obd->u.cli.cl_cksum_type = 1 << i;
return count; return count;
} }
} }
return -EINVAL; return -EINVAL;
......
...@@ -2435,7 +2435,7 @@ static int osc_statfs_interpret(const struct lu_env *env, ...@@ -2435,7 +2435,7 @@ static int osc_statfs_interpret(const struct lu_env *env,
* aware of the problem and takes care * aware of the problem and takes care
* of the clean up * of the clean up
*/ */
return rc; return rc;
if ((rc == -ENOTCONN || rc == -EAGAIN) && if ((rc == -ENOTCONN || rc == -EAGAIN) &&
(aa->aa_oi->oi_flags & OBD_STATFS_NODELAY)) { (aa->aa_oi->oi_flags & OBD_STATFS_NODELAY)) {
......
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