Commit graph

2191 commits

Author SHA1 Message Date
Amir Shehata 21602c7db4 staging: lustre: Dynamic LNet Configuration (DLC)
This is the first patch of a set of patches that enables DLC.

This patch adds some cleanup in the config.c as well as some
preparatory changes in peer.c to enable dynamic network
configuration

Signed-off-by: Amir Shehata <amir.shehata@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2456
Change-Id: I8c8bbf3b55acf4d76f22a8be587b553a70d31889
Reviewed-on: http://review.whamcloud.com/9830
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Frank Zago 4407f6101f staging: lustre: do not memset after LIBCFS_ALLOC
LIBCFS_ALLOC already zero out the memory allocated, so there is no
need to zero out the memory again.

Signed-off-by: Frank Zago <fzago@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5304
Reviewed-on: http://review.whamcloud.com/11012
Reviewed-by: Patrick Farrell <paf@cray.com>
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Liang Zhen ec5fb5be77 staging: lustre: return +ve for blocked lnet message
returned value of lnet_post_send_locked and
lnet_post_routed_recv_locked are changed to -ve by:
http://review.whamcloud.com/#/c/9369/

this is wrong because callers rely on +ve to identify blocked
message which is not a failure.

To respect linux kernel coding style and not use positive error
code, this patch adds two macros as non-error returned values of
these functions:
    LNET_CREDIT_OK    has credit for message
    LNET_CREDIT_WAIT  no credit and message is blocked

both these functions will return these two values instead of 0
and EAGAIN

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5151
Reviewed-on: http://review.whamcloud.com/10625
Reviewed-by: Chris Horn <hornc@cray.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
John L. Hammond 060c2820d0 staging: lustre: remove uses of IS_ERR_VALUE()
Remove most uses of IS_ERR_VALUE(). This macro was often given an int
argument coming from PTR_ERR(). This invokes implementation defined
behavior since the long value gotten by applying PTR_ERR() to a kernel
pointer will usually not be representable as an int. Moreover it may
be just plain wrong to do this since the expressions IS_ERR(p) and
IS_ERR_VALUE((int) PTR_ERR(p)) are not equivalent for a general
pointer p.

Signed-off-by: John L. Hammond <john.hammond@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3498
Reviewed-on: http://review.whamcloud.com/6759
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
James Simmons 764d2e9aed staging: lustre: eliminate obsolete Cray SeaStar support
Remove the bulk of code for the no longer supported
SeaStar interconnect found on older Cray systems.

Signed-off-by: James Simmons <uja.ornl@gmail.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-1422
Reviewed-on: http://review.whamcloud.com/7469
Reviewed-by: Liang Zhen <liang.zhen@intel.com>
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Chuck Fossen <chuckf@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Liang Zhen 600e9b49f6 staging: lustre: fix failure handle of create reply
error handler of lnet_create_reply_msg() didn't release lnet_res_lock
if lnet_msg_alloc() failed.
It can be fixed by moving validation check of msg out from lock.

Signed-off-by: Liang Zhen <liang.zhen@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2745
Reviewed-on: http://review.whamcloud.com/5542
Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Chris Horn 4ee23a84bf staging: lustre: reflect down routes in /proc/sys/lnet/routes
We consider routes "down" if the router is down or the router
NI for the target network is down. This should be reflected
in the output of /proc/sys/lnet/routes

Signed-off-by: Chris Horn <hornc@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3679
Reviewed-on: http://review.whamcloud.com/7857
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Chris Horn 4f0bedeccf staging: lustre: rename variables in lnet_find_route_locked
Rename several variables in lnet_find_route_locked to make
the code easier to understand. Broken out of patch 7857.

Signed-off-by: Chris Horn <hornc@cray.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3679
Reviewed-on: http://review.whamcloud.com/7857
Reviewed-by: Cory Spitz <spitzcor@cray.com>
Reviewed-by: Isaac Huang <he.huang@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:29:23 -08:00
Bhumika Goyal 639868832a Staging: lustre: obdclass: Declare function as static
Declare the function cache_stats_print as static since it is used
only  in this file. Used grep to find occurences. Problem found using
sparse.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:21:15 -08:00
Bhumika Goyal da58688fb0 Staging: lustre: llite: Remove NULL check before kfree
NULL check before kfree is unnecessary so remove it.
Semantic patch used:
// <smpl>
@@ expression E; @@
- if (E != NULL) { kfree(E); }
+ kfree(E);
@@ expression E; @@
- if (E != NULL) { kfree(E); E = NULL; }
+ kfree(E);
+ E = NULL;
// </smpl>

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:21:15 -08:00
Amitoj Kaur Chawla acdd1b8e68 staging: lustre: obdclass: Use IS_ERR_OR_NULL
Use macro IS_ERR_OR_NULL in place of tests for NULL and IS_ERR.

The Coccinelle semantic patch used to make the change is as follows:

//<smpl>
@@
expression e;
@@

- e == NULL || IS_ERR(e)
+ IS_ERR_OR_NULL(e)
//</smpl>

Signed-off-by: Amitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:21:15 -08:00
Niranjan Dighe d60fc1bbc2 staging: lustre/lnet: Fix wrong typecasting warning generated by sparse
Fix the following warning generated about type casting by sparse

warning: cast removes address space of expression

The current implementation casts the structure pointers with (char *)
without __user annotation and then adds sizeof struct to it, thereby
generating the sparse warning. Fixed this by removing the unnecessary
char pointer type cast.

Signed-off-by: Niranjan Dighe <niranjan.dighe@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:21:15 -08:00
James Simmons 5fd88337d2 staging: lustre: fix all conditional comparison to zero in LNet layer
Doing if (rc != 0) or if (rc == 0) is bad form. This patch corrects
the LNet code to behavior according to kernel coding standards.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons 06ace26edc staging: lustre: fix all NULL comparisons in LNet layer
This removes every instance of checking a variable against
NULL in the LNet source code.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons 06f2f2f2bb staging: lustre: balance braces properly in LNet layer
Properly balance the braces done wrong as reported by
checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons b31e64c4a1 staging: lustre: remove space in LNet function declarations
Several function declarations have spacing in them. Lets
remove all those instances reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons d3d3d37a60 staging: lustre: don't set more than one variable per line in LNet layer
Cleanup all occurances of more than one variable being set per line as
reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons 51078e25c1 staging: lustre: add missing spaces for LNet layer reported by checkpatch.pl
Add missing spaces in the code reported by checkpatch.pl.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons e767c84028 staging: lustre: remove unnecessary blank lines reported by checkpatch.pl
Remove any useless blank lines reported by checkpatch.pl
for LNet layer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons 0eee67781c staging: lustre: remove unnecessary parentheses around LNet function pointer
No need for the parentheses around any function pointer.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons c314c319c0 staging: lustre: align all code properly for LNet core
In several places in the LNet core the code doesn't align
up properly. This resolves those checkpath issues.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons 4420cfd3f5 staging: lustre: format properly all comment blocks for LNet core
In several places in the LNet core comment blocks don't follow the
linux kernel style. This patch cleans those problems up.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
James Simmons ddbc66a5e5 staging: lustre: drop *_t from end of struct lnet_text_buf
When lnet_text_buf data structure was transform from typedef
to struct the *_t which is typical of typedef was not drop.
This patch removes the *_t to be consistent.

Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-14 16:20:32 -08:00
Oleg Drokin 59ca8f20b1 staging/lustre: Remove unused LUSTRE_VERSION_ALLOWED_OFFSET define
LUSTRE_VERSION_ALLOWED_OFFSET is only used on the server to disallow
connection of old userspace clients.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:55 -08:00
Oleg Drokin ccaeef6c4c staging/lustre: Update internal client version.
While initial code drop was corresponding to 2.3.64, lots of
different changes went in since then, and also quite a bunch of fixes,
but almost none of the new features.
Code-wise we are almost at 2.5.0, so let's call it 2.4.60 - this is a
version that was never reached in the actual pre-2.5 development, so
it should be a clear distinction of where we are now.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:55 -08:00
Oleg Drokin f3fe3718d8 staging/lustre: Adjust import state history output format
New test scripts expect spaces around state names and square brackets
when parsing debugfs output, so add them to avoid false failures.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:55 -08:00
Oleg Drokin 01de911e14 staging/lustre/obdecho: Better handle invalid create requests
When gettng an invalid create request in echo code (wrong group,
or no group at all), just return an error instead of crashing.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:55 -08:00
Oleg Drokin 61ece0e60d staging/lustre/obdecho: Remove always true condition
Dan Carpenter noticed that since we already checked for
(oa->o_valid & OBD_MD_FLID) == 0, that means
(oa->o_valid & OBD_MD_FLID) is always true after that so
no point in checking for it.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:55 -08:00
Janani Ravichandran a4e872f7b6 staging: lustre: Modify arguments of sizeof() to pointer variables
Take the size of a dereference to a variable rather than the associated
type, to make the code more resistant to type changes in the future.
The type of the pointer variable here is the same as the type in the
argument that is being replaced in sizeof().

Signed-off-by: Janani Ravichandran <janani.rvchndrn@gmail.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:42 -08:00
Rakhi Sharma a1fcca1e9a staging: lustre: lov_pool: Fixed a return coding style warning.
Remove unusefull return at the end of void function.
WARNING: void function return statements are not generally useful.

Signed-off-by: Rakhi Sharma <rakhish1994@gmail.com>

Changes in v3:
  shortened the subject line and make the discription more clear.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:42 -08:00
Bhumika Goyal 1f01063f71 Staging: lustre: lnet: Remove explicit NULL comparision
Replaced explicit NULL comparision with its simplier form.
Found using coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-11 19:29:42 -08:00
Bhaktipriya Shridhar f06104fb32 staging: lusture: obdclass: Remove return statement in void function
Fix the following checkpatch.pl warning:
WARNING: void function return statements are not generally useful

Signed-off-by: Bhaktipriya Shridhar <bhaktipriya96@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 20:17:18 -08:00
CHANG FU CHIAO f6ab21b546 staging: lustre: add static declaration
this function is only referenced within the file

Signed-off-by: CHANG FU CHIAO <zector1030@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Oleg Drokin deaf7e1cc6 staging/lustre/lnet: Don't call roundup_pow_of_two on zero in LNetEQAlloc
roundup_pow_of_two return when called on a zero argument is
undefined, so don't call it like that.

This fixes a problem introduced by commit 322489d9d5
("staging/lustre: Use roundup_pow_of_two() in LNetEQAlloc()")
since 0 is a valid count parameter for LNetEQAlloc. Also manifesting
itself as an annoying kernel warning:
LNet: 3486:0:(lib-eq.c:85:LNetEQAlloc()) EQ callback is guaranteed to get every event, do you still want to set eqcount 1 for polling event which will have locking overhead? Please contact with developer to confirm

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
CC: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Oleg Drokin da33f1dd9f staging/lustre/obdclass: export debugfs functionality for GPL only.
Turns out we mistakenly export some pretty-wide-reaching debugfs
functions as EXPORT_SYMBOL instead of EXPORT_SYMBOL_GPL as we should,
so this patch rectifies the situation.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Oleg Drokin 49a76d7040 staging/lustre/libcfs: Properly handle debugfs read- and write-only files
It turns out that unlike procfs, debugfs does not really enforce
permissions for root (similar to regular filesystems), so we need
to ensure we are not providing ->write() method to read-only files
and ->read() method for write-only files at registration.

This fixes a couple of crashes on unexpected access.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-07 17:34:58 -08:00
Bhumika Goyal 364b72e500 Staging:lustre:lclient:Remove unused function
Discard the function ccc_vmpage_page_transient as it is not used
anywhere in the kernel.
Used grep to find occurences.
Problem found using sparse.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:45:36 -08:00
Bhumika Goyal 61382aa809 Staging:lustre:lustre:llite:Remove explicit NULL comparision
Replaced explicit NULL comparision with its simplier form.
Found using coccinelle:

@replace_rule@
expression e;
@@

-e == NULL
+ !e

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Bhumika Goyal 6ae07f1b38 Staging:lustre:obdclass:linux:simplify NULL comparison
Remove explicit NULL comparision and replace it with a simpier form.
Detected using checkpatch.pl.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Bhumika Goyal 197cb405b3 Staging:lustre:obdclass:linux:remove unnecessary braces
Fixed 'braces {} are not necessary for single statement blocks'
checkpatch.pl warning.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:44:02 -08:00
Sushuruth Sadagopan 587cb02269 staging: lustre: fix comment style
Fix style of several comments.

Signed-off-by: Sushuruth Sadagopan <sushsada@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Anjali Menon 9edece72e2 staging: lustre: lustre: lov: Added space
Added a spaces around '|' to fix the check detected by
checkpatch.pl

CHECK: spaces preferred around that '|' (ctx:VxV)

Signed-off-by: Anjali Menon <cse.anjalimenon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Bhumika Goyal 62fcd58943 Staging:lustre:lustre:obdclass:Remove return from void function
This patch removes the return statement at the end of a void function as
it is not necessary.This was found by checkpatch.pl .

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:42:33 -08:00
Parinay Kondekar b0e7d96088 staging:lustre: remove obsolete comment in libcfs_ioctl.h
The libcfs_ioctl.h header has a comment about a snapshot ioctl
which has been removed for years. Lets remove the comment to
avoid confusion. Broken out of patch 17492.

Signed-off-by: Parinay Kondekar <parinay.kondekar@seagate.com>
Signed-off-by: James Simmons <uja.ornl@yahoo.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5844
Reviewed-on: http://review.whamcloud.com/17492
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:41:01 -08:00
Frank Zago 08816b2eb1 staging/lustre: Add __user annotations in lnetselftest code
This fixes a bunch of sparse warnings.

There is no code change.

Signed-off-by: frank zago <fzago@cray.com>
Reviewed-on: http://review.whamcloud.com/11819
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5396
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:38:00 -08:00
Oleg Drokin af00f6c5ac staging/lustre/llite: Update ll_dir_ioctl pointer casts with __user
When casting unsingned long userspace pointer from ioctl argument to
a pointer suitable for use with userspace access functions, need
to remember to add __user attribute, to make sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin d47bb83b1b staging/lustre: Properly cast ll_getname argument to __user in ll_dir_ioctl
This makes sparse happy.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin 7ec89fa54a staging/lustre: Properly cast ll_fid2path argument to __user in ll_dir_ioctl
This makes sparse happier.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin 61dad0ba9a staging/lustre: Properly cast ll_fid2path argument to __user in ll_file_ioctl
When calling ll_fid2path, it expects a userspace pointer.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00
Oleg Drokin 02f9c12e32 staging/lustre/llite: Update all file.c user pointer casts to __user
unsigned long user address must be casted with __user attribute
to make sparse happy when used with userspace access functions.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-03 14:34:27 -08:00