1
0
Fork 0
Commit Graph

69 Commits (09cbfeaf1a5a67bfb3201e0c83c810cecb2efa5a)

Author SHA1 Message Date
Kirill A. Shutemov 09cbfeaf1a mm, fs: get rid of PAGE_CACHE_* and page_cache_{get,release} macros
PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} macros were introduced *long* time
ago with promise that one day it will be possible to implement page
cache with bigger chunks than PAGE_SIZE.

This promise never materialized.  And unlikely will.

We have many places where PAGE_CACHE_SIZE assumed to be equal to
PAGE_SIZE.  And it's constant source of confusion on whether
PAGE_CACHE_* or PAGE_* constant should be used in a particular case,
especially on the border between fs and mm.

Global switching to PAGE_CACHE_SIZE != PAGE_SIZE would cause to much
breakage to be doable.

Let's stop pretending that pages in page cache are special.  They are
not.

The changes are pretty straight-forward:

 - <foo> << (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;

 - <foo> >> (PAGE_CACHE_SHIFT - PAGE_SHIFT) -> <foo>;

 - PAGE_CACHE_{SIZE,SHIFT,MASK,ALIGN} -> PAGE_{SIZE,SHIFT,MASK,ALIGN};

 - page_cache_get() -> get_page();

 - page_cache_release() -> put_page();

This patch contains automated changes generated with coccinelle using
script below.  For some reason, coccinelle doesn't patch header files.
I've called spatch for them manually.

The only adjustment after coccinelle is revert of changes to
PAGE_CAHCE_ALIGN definition: we are going to drop it later.

There are few places in the code where coccinelle didn't reach.  I'll
fix them manually in a separate patch.  Comments and documentation also
will be addressed with the separate patch.

virtual patch

@@
expression E;
@@
- E << (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
expression E;
@@
- E >> (PAGE_CACHE_SHIFT - PAGE_SHIFT)
+ E

@@
@@
- PAGE_CACHE_SHIFT
+ PAGE_SHIFT

@@
@@
- PAGE_CACHE_SIZE
+ PAGE_SIZE

@@
@@
- PAGE_CACHE_MASK
+ PAGE_MASK

@@
expression E;
@@
- PAGE_CACHE_ALIGN(E)
+ PAGE_ALIGN(E)

@@
expression E;
@@
- page_cache_get(E)
+ get_page(E)

@@
expression E;
@@
- page_cache_release(E)
+ put_page(E)

Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-04-04 10:41:08 -07:00
Oleg Drokin 22ea97f05c staging/lustre: Fix lines that start with spaces
Found with checkpatch.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:17:41 -08:00
Oleg Drokin e15ba45d92 staging/lustre/llite: Fix style vs open parenthesis alignment
This mostly fixes checkpatch complaints about
"Alignment should match open parenthesis"

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-03-01 19:17:41 -08:00
Oleg Drokin c0894c6cfe staging/lustre/llite: Adjust comments to better conform to coding style
This patch fixes "Block comments use a trailing */ on a separate line"
warnings from checkpatch.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-25 22:08:59 -08:00
Oleg Drokin 6e16818b24 staging/lustre/llite: Adjust NULL comparison codestyle
All instances of "x == NULL" are changed to "!x" and
"x != NULL" to "x"

The only exception is ll_update_inode where dropping != NULL
in the construction below would break the logic.
I guess we could change lsm != NULL to !!lsm, but that's uglier.
(lsm != NULL) == ((body->valid & OBD_MD_FLEASIZE) != 0)

Also removed some redundant assertions.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:33:11 -08:00
Oleg Drokin 42608246a8 staging/lustre/llite: Get rid of /proc references in comments
Now that the sysfs conversion is complete, also convert all the
remaining comments

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-20 14:33:11 -08:00
Andreas Dilger 1dc563a682 staging: lustre: update Intel copyright messages 2015
Update copyright messages in files modified by Intel employees
in 2015 by non-trivial patches.  Exclude patches that are only
deleting code, renaming functions, or adding or removing whitespace.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7243
Reviewed-on: http://review.whamcloud.com/16758
Reviewed-by: James Nunez <james.a.nunez@intel.com>
Reviewed-by: James Simmons <uja.ornl@yahoo.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>
2015-12-21 15:38:00 -08:00
Mike Rapoport c9f6bb961d staging: lustre: add a blank line after function/struct/union/enum declarations
Fixes checkpatch.pl CHECK:LINE_SPACING: Please use a blank line after
function/struct/union/enum declarations

The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --fix-inplace -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Mike Rapoport 106495c41f staging: lustre: remove multiple blank lines
Fixes checkpatch.pl CHECK:LINE_SPACING: Please don't use multiple blank
lines.

The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=multiple \
    --fix-inplace  -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Mike Rapoport 50ffcb7edc staging: lustre: add missing blank line after declarations
Fixes checkpatch.pl WARNING:LINE_SPACING: Missing a blank line after
declarations.
The patch is generated using checkpatch.pl --fix-inplace:

for f in $(find drivers/staging/lustre/ -type f) ; do
    ./scripts/checkpatch.pl --types "LINE_SPACING" --test-only=Missing \
    --fix-inplace -f $f
done

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-10-13 10:21:10 -07:00
Arnd Bergmann 05406826aa staging/lustre: use 64-bit llite debugfs timestamps
The llite debugfs interface contains timestamps that are computed
from timeval, which overflows in 2038 on 32-bit systems.

This changes the output to use a timespec64 type to avoid the
overflow. I also change the format to print the sub-second portion
as 9 digits (nanoseconds) for clarity, rather than printing six
digits without leading zeroes.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-29 04:03:37 +02:00
Mike Rapoport 910b551c85 staging: lustre: fix TRAILING_STATEMENTS checkpatch errors
Move trailing statements to be on the next line to fix the
TRAILING_STATEMENTS checkpatch error.

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-14 08:50:44 -07:00
Mike Rapoport b2952d62ba staging: lustre: fix whitespace errors reported by checkpatch.pl
Added/removed spaces and replaced '+1' with '1' in several places to
eliminate SPACING and POINTER_LOCATION errors reported by checkpatch.pl

Signed-off-by: Mike Rapoport <mike.rapoport@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-09-12 18:24:39 -07:00
Oleg Drokin ae7c0f4833 staging/lustre/llite: Move all remaining procfs entries to debugfs
This moves all remaining procfs handling in llite layer to debugfs.

Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 15:26:38 +09:00
Oleg Drokin d8ede3f1d5 staging/lustre/llite: make llite/lov and lmv symlinks
old proc code had /proc/sys/fs/lustre/llite/.../lov and lmv
dirs that contained name of the dir in lustre/lov and lustre/lmv
to better be able to find correct obd device there, but
I imagien a better solution would be to just create a symlink with
the same name. The name is then pointless and the target dir would
have uuid file just as if it was the old-style dir.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:18:24 +09:00
Oleg Drokin 2962b440df staging/lustre: Remove useless num_refs procfs variable
Every obd type registers it, but it's not really needed by anybody.
Remove all the supporting infrastructure too.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 11:16:54 +09:00
Oleg Drokin 070c29ca79 staging/lustre/llite: move /proc/fs/lustre/llite/xattr_cache to sysfs
Move xattr_cache file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin d36f2b0ba8 staging/lustre/llite: remove llite/*_cookiesize proc files
Since Lustre 2.5, cookiesize is unused on the clients since
MDS now does final object unlink by itself, so drop these
max_cookiesize and default_cookiesize files.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin f5501d042e staging/lustre/llite: move /proc/fs/lustre/llite/*_easize to sysfs
Move max_easize and default_easize files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin c7fe64bdd0 staging/lustre/llite: move /proc/fs/lustre/llite/lazystatfs to sysfs
Move lazystatfs file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 4081a3201a staging/lustre/llite: move /proc/fs/lustre/llite/statahead_{max, agl} to sysfs
Move statahead_max and statahead_agl files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 62cf4b1315 staging/lustre/llite: move /proc/fs/lustre/llite/stats_track* to sysfs
Move stats_track_pid, stats_track_ppid and stats_track_gid  files
from /proc/fs/lustre/llite/* to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 06ed0cd897 staging/lustre/llite: remove unused ll_max_rw_chunk
ll_max_rw_chunk seems to be unused ever since we implemented CLIO in 2.0,
so remove it and all supporting infrastructure.

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:50:18 +09:00
Oleg Drokin 40cc864a9f staging/lustre/llite: move /proc/fs/lustre/llite/checksum_pages to sysfs
Move checksum_pages file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin ec46923586 staging/lustre/llite: move llite/max_read_ahead_whole_mb to sysfs
Move max_read_ahead_whole_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 0e6c5a219a staging/lustre/llite: move llite/max_read_ahead_per_file_mb to sysfs
Move max_read_ahead_per_file_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin e1a1df5e88 staging/lustre/llite: move /proc/fs/lustre/llite/max_read_ahead_mb to sysfs
Move max_read_ahead_mb file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin ec55a62999 staging/lustre/llite: move /proc/fs/lustre/llite/uuid to sysfs
Move uuid file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 0cee667682 staging/lustre/llite: move /proc/fs/lustre/llite/fstype to sysfs
Move fstype file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 95e1b6b0cf staging/lustre/llite: move /proc/fs/lustre/llite/client_type to sysfs
Move client_type file from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:03 +09:00
Oleg Drokin 7267ec0d87 staging/lustre/llite: move /proc/fs/lustre/llite/files* to sysfs
Move filestotal and filesfree files from /proc/fs/lustre/llite/*
to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 5804b11e14 staging/lustre/llite: move /proc/fs/lustre/llite/kbytes* to sysfs
Move kbytestotal, kbytesavail and kbytesfree files from
/proc/fs/lustre/llite/* to /sys/fs/lustre/llite/*/

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin 364bcfc863 staging/lustre/llite: move /proc/fs/lustre/llite/blocksize to sysfs
Move blocksize file from /proc/fs/lustre/llite/*/ to
/sys/fs/lustre/llite/*/blocksize

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Oleg Drokin fd0d04ba85 staging/lustre/llite: Preparation to move /proc/fs/lustre/llite to sysfs
Add necessary infrastructure, add support for mountpoint
registration in /proc/fs/lustre/llite

Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31 10:48:02 +09:00
Haneen Mohammed dfc1697397 Staging: lustre: Fix spelling mistakes
This patch fix the following spelling mistakes:
interoprability, SEPERATOR, defult.

Issue found using checkpatch.pl.

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-18 10:34:26 +01:00
Joe Perches 91b3a68558 staging: lustre: Convert uses of "int rc = seq_printf(...)"
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Convert these uses to:

	seq_printf(seq, ...);

	return 0;

Done via cocci script:

@@
struct seq_file *seq;
int i;
@@
-	i = seq_printf(seq,
+	seq_printf(seq,
		   ...);
	...
-	return i;
+	return 0;

@@
struct seq_file *seq;
int i;
@@
-	i = 0;
-	i += seq_printf(seq,
+	seq_printf(seq,
	           ...);
	...
-	return i;
+	return 0;

With some additional reformatting and typing post conversion
to remove the now unnecessary "int i;" declaration.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 20:19:01 -08:00
Joe Perches ab75fb2de1 staging: lustre: Convert remaining uses of "= seq_printf(...)"
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Convert the remaining uses by hand.

Miscellanea:

o Convert fixed string output to seq_puts

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 17:21:27 -08:00
Joe Perches 8faeebdf15 staging: lustre: Convert "return seq_printf(...)" uses
The seq_printf return value, because it's frequently misused,
will eventually be converted to void.

See: commit 1f33c41c03 ("seq_file: Rename seq_overflow() to
     seq_has_overflowed() and make public")

Convert these "return seq_printf(...)" uses to:

	seq_printf(seq, ...);
	return 0;

Done via cocci script:

@@
struct seq_file *seq;
@@

-	return
	\(seq_printf\|seq_puts\|seq_putc\)(seq,
	...);

+	return 0;

With some additional reformatting and typing post conversion.

Miscellanea:

o convert an rc++ use to a bool
o use seq_puts with fixed strings where appropriate

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 17:21:21 -08:00
Aya Mahfouz 107d22095d staging: lustre: llite: remove unused variable
This patch removes a variable that was simply used to
store the return value of a function call before
returning it.

The issue was detected and resolved using the following
coccinelle script:

@@
identifier len,f;
@@

-int len;
 ... when != len
     when strict
-len =
+return
        f(...);
-return len;

Signed-off-by: Aya Mahfouz <mahfouz.saif.elyazal@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-01 16:28:06 -08:00
Jinshan Xiong c2fcdf6c42 staging/lustre/llite: to configure max_cached_mb correctly
If there exists MGS conf_param to reduce the memory cache
max_cached_mb it will fail because dt_exp is not initialized
yet.

It should just go ahead and configure it because certainly it
have enough free LRU slot to deduct ccc_lru_left.

Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-on: http://review.whamcloud.com/11783
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3676
Reviewed-by: Bobi Jam <bobijam@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-02-07 17:31:10 +08:00
Joe Perches 2d00bd17a2 staging: lustre: Coalesce string fragments
Join the string fragments to make it easier to grep.

Ignored all the 80+ column lines.
Added many missing spaces when coalescing formats.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-23 13:17:57 -08:00
Anh Le 5a13503ecd Staging: lustre: llite: fix some sparse warnings about userspace pointer
Add __user macro to the function declarations that accept userspace pointers as
arguments.

Signed-off-by: Anh Le <anhlq2110@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:25:23 +08:00
Tina Ruchandani 588bf52aa3 Staging: lustre: llite: Remove C99 '//' comments
This patch fixes the following checkpatch.pl errors:

ERROR: do not use C99 // comments
538: FILE: drivers/staging/lustre/lustre/llite/rw26.c:538:
//	.orig_aops.readpages      = ll_readpages,
816: FILE: drivers/staging/lustre/lustre/llite/lproc_llite.c:816:
	//{ "mntpt_path",   ll_rd_path,	     0, 0 },
826: FILE: drivers/staging/lustre/lustre/llite/lproc_llite.c:826:
	//{ "filegroups",   lprocfs_rd_filegroups,  0, 0 },

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-23 11:09:12 +08:00
Julia Lawall 34e1f2bb1e staging: lustre: llite: expand the GOTO macro
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
@@

if (...)
  GOTO(lbl,...);
+else
GOTO(lbl,...);

@@
identifier lbl,rc;
constant c;
expression e,e1;
@@

if (
-   e
+   !e
   )
-  GOTO(lbl,\(rc\|c\));
-else GOTO(lbl,e1);
+  e1;
+goto lbl;

@@
identifier lbl,rc;
constant c;
expression e,e1;
@@

if (e)
-  GOTO(lbl,e1);
-else GOTO(lbl,\(rc\|c\));
+  e1;
+goto lbl;

@@
identifier lbl;
expression e,e1,e2;
@@

if (e)
-  GOTO(lbl,e1);
-else GOTO(lbl,e2);
+  e1;
+else e2;
+goto lbl;

// ------------------------------------------------------------------------

@@
identifier lbl,rc;
constant c;
@@

- GOTO(lbl,\(rc\|c\));
+ goto lbl;

@@
identifier lbl;
expression rc;
@@

- GOTO(lbl,rc);
+ rc;
+ goto lbl;
// </smpl>

The rules above the line deal with the case where the goto desination is
the same whether or not the the branch is taken.  In that case, the goto is
created in just one instance after the if.  This affects only the files
namei.c and llite_lib.c.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 12:23:30 -07:00
Greg Donald 1d8cb70c7b drivers: staging: lustre: Fix space required after that ',' errors
Fix checkpatch.pl space required after that ',' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 12:05:39 -07:00
Greg Donald a58a38ac0d drivers: staging: lustre: Fix space required before the open parenthesis '(' errors
Fix checkpatch.pl space required before the open parenthesis '(' errors

Signed-off-by: Greg Donald <gdonald@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 11:59:52 -07:00
Radek Dostal ea7893bb39 staging: lustre: fix sparse warnings "Using plain integer as NULL pointer"
fixes all sparse warnings "Using plain integer as NULL pointer"
in drivers/staging/lustre

drivers/staging/lustre/lnet/lnet/api-ni.c:1665:32: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lnet/lnet/api-ni.c:1773:35: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/fld/fld_request.c:171:17: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/llite_lib.c:155:30: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/llite/lproc_llite.c:846:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:902:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:946:54: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_obd.c:2819:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/lov/lov_dev.c:456:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2426:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2569:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/mdc_request.c:2740:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:175:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:176:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:177:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:178:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:179:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:180:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:181:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:182:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:183:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:185:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:186:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:193:66: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:194:63: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:195:56: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:196:51: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:197:50: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:198:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:199:57: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:200:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:206:48: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mdc/lproc_mdc.c:207:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/mgc/mgc_request.c:199:9: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/linux/linux-module.c:331:11: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1164:53: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/obd_config.c:1306:71: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:943:62: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdclass/llog_test.c:944:65: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/obdecho/echo_client.c:3116:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3424:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3548:46: warning: Using plain integer as NULL pointer
drivers/staging/lustre/lustre/osc/osc_request.c:3615:46: warning: Using plain integer as NULL pointer

Signed-off-by: Radek Dostal <rd@radekdostal.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 17:03:30 -07:00
NeilBrown b1beb91b0e staging/lustre: fix misuse of current->parent.
current->parent is used by ptrace to redirect some signal delivery
to the ptracer.  It should only be used by 'ptrace' or 'signal' code.
All other users should  use current->real_parent, which is the real
parent.

Signed-off-by: NeilBrown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-18 16:35:42 -07:00
Greg Kroah-Hartman b0f5aad587 staging: lustre: remove LPU64 define
Just use the proper modifier type...

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-12 20:25:57 -07:00
Greg Kroah-Hartman 67a235f5e5 staging: lustre: llite: remove ccflags from Makefile
Fix up the relative paths in the .c files to properly build with the
Makefile change.

Cc: Andreas Dilger <andreas.dilger@intel.com>
Cc: Oleg Drokin <oleg.drokin@intel.com>
Cc: hpdd-discuss <hpdd-discuss@lists.01.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11 21:57:19 -07:00