summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre
AgeCommit message (Collapse)Author
2014-02-22staging: lustre: fix quotactl permission denied (LU-4530)Cédric Dufour
commit 8b9e418c013e8b671fc10108ab14243f0657bffd upstream. The changes introduced in commit 4b1a25f06b30b203 ("fix build when CONFIG_UIDGID_STRICT_TYPE_CHECKS is on") got the UID check the wrong way around, leading to "Permission denied" when a regular user attempts to retrieve his quota (lfs quota -u ...) but allowing him to retrieve other users quota. Full details at: https://jira.hpdd.intel.com/browse/LU-4530 Cc: Peng Tao <tao.peng@emc.com> Signed-off-by: Cédric Dufour <cedric.dufour@idiap.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-06staging/lustre/ptlrpc: Fix a crash when dereferencing NULL pointerAmir Shehata
commit 3c92a0bf4d72737035a16c4fe357ccd439c9b7d2 upstream. When a system runs out of memory and the function ptlrpc_register_bulk() is called from ptl_send_rpc() the call to LNetMEAttach() fails due to failure to allocate memory. This forces the code into an error path, which most probably previously went untested. The error path: if (rc != 0) { CERROR("%s: LNetMEAttach failed x"LPU64"/%d: rc = %dn", desc->bd_export->exp_obd->obd_name, xid, posted_md, rc); break; } This print assumes that desc->bd_export is not NULL. However, it is. In fact it is expected to be NULL. desc->bd_import is the correct structure to access in this case. Lustre-change: http://review.whamcloud.com/7121 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3585 Signed-off-by: Amir Shehata <amir.shehata@intel.com> Reviewed-by: Liang Zhen <liang.zhen@intel.com> Reviewed-by: Doug Oucharek <doug.s.oucharek@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-04staging/lustre/ptlrpc: fix ptlrpc_stop_pinger logicPeng Tao
commit b39f15c972c462903208531b82f9b34ba8ef3ec0 upstream. It was introduced due to a patch hunk when porting commit 20802057 (staging/lustre/ptlrpc: race in pinger). Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Peng Tao <bergwolf@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-25staging: lustre: Cocci spatch "noderef"Thomas Meyer
sizeof when applied to a pointer typed expression gives the size of the pointer. Found by coccinelle spatch "misc/noderef.cocci" Signed-off-by: Thomas Meyer <thomas@m3y3r.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: Disable lustre file system for MIPS, SH, and XTENSAGuenter Roeck
mips allmodconfig fails with ERROR: "copy_from_user_page" [drivers/staging/lustre/lustre/libcfs/libcfs.ko] undefined! which is due to LUSTRE using copy_from_user_page which is not exported by any architecture. Unfortunately, LUSTRE can only be built as module, so there is no easy fix. MIPS, SH, and optionally XTENSA implement copy_from_user_page as unexported functions. Disable LUSTRE for those. Cc: Peng Tao <bergwolf@gmail.com> Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c: rename PTRS_PER_PAGEAndrew Morton
It duplicates the definition in arch/alpha/include/asm/pgtable.h and emits warnings. Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Peng Tao <tao.peng@emc.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging: lustre: clean up format string usagesKees Cook
This fixes up the usage of snprintf, strncpy, and format strings in the call to kthread_run to avoid ever accidentally allowing a format string into the thread name. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17staging/lustre: Correct default for LUSTRE_TRANSLATE_ERRNOSGeert Uytterhoeven
LUSTRE_TRANSLATE_ERRNOS is never enabled, a "true" is not a valid value. Use "default y" instead of "default true" to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-13Merge git://git.kvack.org/~bcrl/aio-nextLinus Torvalds
Pull aio changes from Ben LaHaise: "First off, sorry for this pull request being late in the merge window. Al had raised a couple of concerns about 2 items in the series below. I addressed the first issue (the race introduced by Gu's use of mm_populate()), but he has not provided any further details on how he wants to rework the anon_inode.c changes (which were sent out months ago but have yet to be commented on). The bulk of the changes have been sitting in the -next tree for a few months, with all the issues raised being addressed" * git://git.kvack.org/~bcrl/aio-next: (22 commits) aio: rcu_read_lock protection for new rcu_dereference calls aio: fix race in ring buffer page lookup introduced by page migration support aio: fix rcu sparse warnings introduced by ioctx table lookup patch aio: remove unnecessary debugging from aio_free_ring() aio: table lookup: verify ctx pointer staging/lustre: kiocb->ki_left is removed aio: fix error handling and rcu usage in "convert the ioctx list to table lookup v3" aio: be defensive to ensure request batching is non-zero instead of BUG_ON() aio: convert the ioctx list to table lookup v3 aio: double aio_max_nr in calculations aio: Kill ki_dtor aio: Kill ki_users aio: Kill unneeded kiocb members aio: Kill aio_rw_vect_retry() aio: Don't use ctx->tail unnecessarily aio: io_cancel() no longer returns the io_event aio: percpu ioctx refcount aio: percpu reqs_available aio: reqs_active -> reqs_available aio: fix build when migration is disabled ...
2013-09-10staging/lustre/libcfs: cleanup linux-mem.hPeng Tao
remove shrinker related wrappers. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-09-10staging/lustre/ptlrpc: convert to new shrinker APIPeng Tao
Convert sptlrpc encode pool shrinker to use scan/count API. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-09-10staging/lustre/obdclass: convert lu_object shrinker to count/scan APIPeng Tao
convert lu_object shrinker to new count/scan API. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-09-10staging/lustre/ldlm: convert to shrinkers to count/scan APIPeng Tao
convert ldlm shrinker to new count/scan API. Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Cc: Michal Hocko <mhocko@suse.cz> Cc: Dave Chinner <dchinner@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-08-26staging: lustre: Fix typo in lustre/lnetMasanari Iida
Correct spelling typo in comments and debug messages. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-23staging: lustre: Use proper constant types for L*_POISON valuesGeert Uytterhoeven
On 32-bit m68k, I get lots of warnings like: warning: integer constant is too large for ‘long’ type Switch the L*_POISON definitions from too-large constants and casts to the proper constant types to fix this. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-21staging: lustre: Fix typo in lustre/includeMasanari Iida
Fix spelling typo in comments within lustre/include/linux. Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-12staging: lustre: re-use kbasename() common helperAndy Shevchenko
To get the name of a file from a pathname we may use kbasename() helper. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-06staging/lustre: kiocb->ki_left is removedPeng Tao
We also missed ki_nbytes... Cc: Kent Overstreet <koverstreet@google.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Benjamin LaHaise <bcrl@kvack.org>
2013-08-04staging: lustre: remove proc_dir_entry_t typedefGreg Kroah-Hartman
Use struct proc_dir_entry like the rest of the kernel does. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove strange journal macros into the one file using themGreg Kroah-Hartman
This moves the PUSH_JOURNAL and friend macros into debug.c, as that's the only place they are used, so why are they even a macro? Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove task_t typedefGreg Kroah-Hartman
Use struct task_struct instead. Also remove the unused libcfs_current() function, while I noticed it doing this conversion. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove cfs_task_state_tGreg Kroah-Hartman
It's just a long, so remove the typedef and use long. Side note, all the functions like waitq_* should be removed as well, they are wrapping functions that don't really do what it seems that they do based on their name. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove CFS_DECL_WAITQ() macroGreg Kroah-Hartman
Just use DECLARE_WAIT_QUEUE_HEAD() instead. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove timer_list_t typedefGreg Kroah-Hartman
Use struct timer_list instead. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove unused cfs_ waitqueue wrappersGreg Kroah-Hartman
These weren't ever used, so just remove them. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove cfs_module() macroGreg Kroah-Hartman
Open code the module_init/module_exit lines, and also use MODULE_VERSION, as it seems that was intended, but just never hooked up at all. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-04staging: lustre: remove wrappers for two atomic functionsGreg Kroah-Hartman
Just call them directly, like the rest of the kernel does. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove typedef for group_info_tGreg Kroah-Hartman
Use "struct group_info" like the rest of the kernel, not a typedef. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove typedef for module_tGreg Kroah-Hartman
Use "struct module" like the rest of the kernel, not a typedef. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove unused cfs_"symbol" macrosGreg Kroah-Hartman
These aren't used, so remove them. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove cfs_for_each_possible_cpu()Greg Kroah-Hartman
It was just a wrapper around for_each_possible_cpu() Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove ll_crypto_alloc_blkcipherGreg Kroah-Hartman
Turns out that the ll_crypto_alloc_blkcipher() wrapper didn't even do anything, and is probably wrong, so it's not needed, just call the crypto core directly. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove almost all crypto layer wrappersGreg Kroah-Hartman
Almost all of these are just a straight function name rename, so fix them all up to call the crypto layer properly, no need for a #define to hide things. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove cfs_register_sysctl_table macroGreg Kroah-Hartman
It was a wrapper around register_sysctl_table, so just remove it. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-03staging: lustre: remove RETURN macroGreg Kroah-Hartman
We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove EXIT macroGreg Kroah-Hartman
We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove RETURN_EXIT macroGreg Kroah-Hartman
We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ENTRY macroGreg Kroah-Hartman
We have a kernel-wide function tracing system, so use that instead of rolling a custom one just for one filesystem. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ENTRY/EXIT_NESTING stuffGreg Kroah-Hartman
These macros were empty, so remove them in anticipation of removing the entire ENTRY/EXIT macros. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_invalidate_bdev()Greg Kroah-Hartman
It was a wrapper around invalidate_bdev(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_vfs_symlink()Greg Kroah-Hartman
No one was ever even using it. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_generic_permission()Greg Kroah-Hartman
It was a wrapper around generic_permission(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_permission()Greg Kroah-Hartman
It was a wrapper around inode_permission(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_generic_file_llseek_size()Greg Kroah-Hartman
It was a wrapper around generic_file_llseek_size(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_dentry_open()Greg Kroah-Hartman
It was a wrapper around dentry_open(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging: lustre: remove ll_blkdev_put()Greg Kroah-Hartman
It was a wrapper around blkdev_put(), totally useless. Cc: Peng Tao <tao.peng@emc.com> Cc: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-08-02staging/lustre: lloop depends on BLOCKXiong Zhou
Add a config option for llite/lloop in lustre driver, making it depends on BLOCK to fix this better: drivers/staging/lustre/lustre/fid/../include/linux/lustre_compat25.h:117:2: error: implicit declaration of function ‘unregister_blkdev' Also, remove the wrapper ll_unregister_blkdev which depends on BLOCK in the header and just call unregister_blkdev in lloop.c based on Peng Tao's comment. Drop the redundant dependency on STAGING for LUSTRE_FS, remove some unnecessary jdb header files which depends on BLOCK btw. Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Reviewed-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: lustre: Fix sparse warnings about use of obsolete initializerEmil Goode
This patch fixes a lot of sparse warnings about use of obsolete struct and array initializer. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-29staging: lustre: Fix non-ANSI sparse warningsEmil Goode
This patch fixes a lot of non-ANSI sparse warnings by adding void to parameterless functions. Signed-off-by: Emil Goode <emilgoode@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-25staging/lustre: add BLOCK depends in KconfigXiong Zhou
Add BLOCK depends in Kconfig for LUSTRE to fix this: drivers/staging/lustre/lustre/fid/../include/linux/lustre_compat25.h:117:2: error: implicit declaration of function ‘unregister_blkdev’ Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>