Whamcloud - gitweb
git://git.whamcloud.com
/
fs
/
lustre-release.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LU-6401 headers: Create single .h for lu_seq_range
[fs/lustre-release.git]
/
lustre
/
fid
/
lproc_fid.c
diff --git
a/lustre/fid/lproc_fid.c
b/lustre/fid/lproc_fid.c
index
bec325b
..
2f7c670
100644
(file)
--- a/
lustre/fid/lproc_fid.c
+++ b/
lustre/fid/lproc_fid.c
@@
-27,7
+27,7
@@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
- * Copyright (c) 2011, 201
3
, Intel Corporation.
+ * Copyright (c) 2011, 201
4
, Intel Corporation.
*/
/*
* This file is part of Lustre, http://www.lustre.org/
*/
/*
* This file is part of Lustre, http://www.lustre.org/
@@
-51,7
+51,7
@@
#include <lprocfs_status.h>
#include "fid_internal.h"
#include <lprocfs_status.h>
#include "fid_internal.h"
-#ifdef
LPROC
FS
+#ifdef
CONFIG_PROC_
FS
/* Format: [0x64BIT_INT - 0x64BIT_INT] + 32 bytes just in case */
#define MAX_FID_RANGE_STRLEN (32 + 2 * 2 * sizeof(__u64))
/* Format: [0x64BIT_INT - 0x64BIT_INT] + 32 bytes just in case */
#define MAX_FID_RANGE_STRLEN (32 + 2 * 2 * sizeof(__u64))
@@
-91,7
+91,7
@@
lprocfs_fid_write_common(const char __user *buffer, size_t count,
rc = sscanf(kernbuf, "[%llx - %llx]\n",
(long long unsigned *)&tmp.lsr_start,
(long long unsigned *)&tmp.lsr_end);
rc = sscanf(kernbuf, "[%llx - %llx]\n",
(long long unsigned *)&tmp.lsr_start,
(long long unsigned *)&tmp.lsr_end);
- if (!
range_is_sane(&tmp) ||
range_is_zero(&tmp) ||
+ if (!
lu_seq_range_is_sane(&tmp) || lu_seq_
range_is_zero(&tmp) ||
tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end)
RETURN(-EINVAL);
*range = tmp;
tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end)
RETURN(-EINVAL);
*range = tmp;
@@
-361,7
+361,10
@@
static int fldb_seq_open(struct inode *inode, struct file *file)
fld = ss->lss_site->ss_server_fld;
LASSERT(fld != NULL);
fld = ss->lss_site->ss_server_fld;
LASSERT(fld != NULL);
- LPROCFS_ENTRY_CHECK(PDE(inode));
+ rc = LPROCFS_ENTRY_CHECK(inode);
+ if (rc < 0)
+ return rc;
+
rc = seq_open(file, &fldb_sops);
if (rc)
return rc;
rc = seq_open(file, &fldb_sops);
if (rc)
return rc;
@@
-383,7
+386,7
@@
static int fldb_seq_open(struct inode *inode, struct file *file)
env_init = 1;
iops = &obj->do_index_ops->dio_it;
env_init = 1;
iops = &obj->do_index_ops->dio_it;
- param->fsp_it = iops->init(¶m->fsp_env, obj, 0
, NULL
);
+ param->fsp_it = iops->init(¶m->fsp_env, obj, 0);
if (IS_ERR(param->fsp_it))
GOTO(out, rc = PTR_ERR(param->fsp_it));
if (IS_ERR(param->fsp_it))
GOTO(out, rc = PTR_ERR(param->fsp_it));
@@
-570,10
+573,8
@@
lprocfs_client_fid_width_seq_write(struct file *file, const char __user *buffer,
if (val <= max && val > 0) {
seq->lcs_width = val;
if (val <= max && val > 0) {
seq->lcs_width = val;
- if (rc == 0) {
- CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
- seq->lcs_name, seq->lcs_width);
- }
+ CDEBUG(D_INFO, "%s: Sequence size: "LPU64"\n",
+ seq->lcs_name, seq->lcs_width);
}
mutex_unlock(&seq->lcs_mutex);
}
mutex_unlock(&seq->lcs_mutex);
@@
-647,4
+648,5
@@
struct lprocfs_vars seq_client_proc_list[] = {
.fops = &lprocfs_client_fid_fid_fops },
{ NULL }
};
.fops = &lprocfs_client_fid_fid_fops },
{ NULL }
};
-#endif
+
+#endif /* CONFIG_PROC_FS */