Commit Graph

1055 Commits

Author SHA1 Message Date
Al Viro 5242d42297 [regression] braino in "lustre: use is_root_inode()"
In one of the places (ll_md_blocking_ast()) we had open-coded
!is_root_inode(inode) and replaced it with is_root_inode(inode).
See the last chunk of f76c23:
-                   inode != inode->i_sb->s_root->d_inode)
+                   is_root_inode(inode))
should've been
+                   !is_root_inode(inode))
obviously...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-12-26 22:43:19 -05:00
Al Viro 1ad581ebf3 lustre: get rid of playing with ->fs
* removed several pieces of dead code in lustre_compat25.h
* don't open-code current_umask() (and BTW, 0755 & (S_IRWXUGO | S_ISVTX)
is better spelled as 0755)
* fix broken attempt to get the pathname by dentry - abusing d_path() for
that is simply wrong.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-12-17 06:43:56 -05:00
Linus Torvalds dab363f938 Staging patches for 3.19-rc1
Here's the big staging tree pull request for 3.19-rc1.
 
 We continued to delete more lines than were added, always a good thing,
 but not at a huge rate this release, only about 70k lines removed
 overall mostly from removing the horrid bcm driver.
 
 Lots of normal staging driver cleanups and fixes all over the place,
 well over a thousand of them, the shortlog shows all the horrid details.
 
 The "contentious" thing here is the movement of the Android binder code
 out of staging into the "real" part of the kernel.  This is code that
 has been stable for a few years now and is working as-is in the tens of
 millions of devices with no issues.  Yes, the code is horrid, and the
 userspace api leaves a lot to be desired, but it's not going to change
 due to legacy issues that we have no control over.  Because so many
 devices and companies rely on this, and the code is stable, might as
 well promote it out of staging.
 
 This was all discussed at the Linux Plumbers conference, and everyone
 participating agreed that this was the best way forward.
 
 There is work happening to replace the binder code with something new
 that is happening right now, but I don't expect to see the results of
 that work for another year at the earliest.  If that ever happens, and
 Android switches over to it, I'll gladly remove this version.
 
 As for maintainers, I'll be glad to maintain this code, I've been doing
 it for the past few years with no problems.  I'll send a MAINTAINERS
 entry for it before 3.19-final is out, still need to talk to the Google
 developers about if they are willing to help with it or not, last I
 checked they were, which was good.
 
 All of these patches have been in linux-next for a while with no
 reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2
 
 iEYEABECAAYFAlSPICkACgkQMUfUDdst+yksdwCfSLE9VUy1o2sAPDRe+J3bQced
 EWEAoL3RtnejKbo5tHS2IT69pLrwiIDS
 =YXyM
 -----END PGP SIGNATURE-----

Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging

Pull staging driver updates from Greg KH:
 "Here's the big staging tree pull request for 3.19-rc1.

  We continued to delete more lines than were added, always a good
  thing, but not at a huge rate this release, only about 70k lines
  removed overall mostly from removing the horrid bcm driver.

  Lots of normal staging driver cleanups and fixes all over the place,
  well over a thousand of them, the shortlog shows all the horrid
  details.

  The "contentious" thing here is the movement of the Android binder
  code out of staging into the "real" part of the kernel.  This is code
  that has been stable for a few years now and is working as-is in the
  tens of millions of devices with no issues.  Yes, the code is horrid,
  and the userspace api leaves a lot to be desired, but it's not going
  to change due to legacy issues that we have no control over.  Because
  so many devices and companies rely on this, and the code is stable,
  might as well promote it out of staging.

  This was all discussed at the Linux Plumbers conference, and everyone
  participating agreed that this was the best way forward.

  There is work happening to replace the binder code with something new
  that is happening right now, but I don't expect to see the results of
  that work for another year at the earliest.  If that ever happens, and
  Android switches over to it, I'll gladly remove this version.

  As for maintainers, I'll be glad to maintain this code, I've been
  doing it for the past few years with no problems.  I'll send a
  MAINTAINERS entry for it before 3.19-final is out, still need to talk
  to the Google developers about if they are willing to help with it or
  not, last I checked they were, which was good.

  All of these patches have been in linux-next for a while with no
  reported issues"

* tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (1382 commits)
  Staging: slicoss: Fix long line issues in slicoss.c
  staging: rtl8712: remove unnecessary else after return
  staging: comedi: change some printk calls to pr_err
  staging: rtl8723au: hal: Removed the extra semicolon
  lustre: Deletion of unnecessary checks before three function calls
  staging: lustre: fix sparse warnings: static function declaration
  staging: lustre: fixed sparse warnings related to static declarations
  staging: unisys: remove duplicate header
  staging: unisys: remove unneeded structure
  staging: ft1000 : replace __attribute ((__packed__) with __packed
  drivers: staging: rtl8192e: Include "asm/unaligned.h" instead of "access_ok.h" in "rtl819x_BAProc.c"
  Drivers:staging:rtl8192e: Fixed checkpatch warning
  Drivers:staging:clocking-wizard: Added a newline
  staging: clocking-wizard: check for a valid clk_name pointer
  staging: rtl8723au: Hal_InitPGData() avoid unnecessary typecasts
  staging: rtl8723au: _DisableAnalog(): Avoid zero-init variables unnecessarily
  staging: rtl8723au: Remove unnecessary wrapper _ResetDigitalProcedure1()
  staging: rtl8723au: _ResetDigitalProcedure1_92C() reduce code obfuscation
  staging: rtl8723au: Remove unnecessary wrapper _DisableRFAFEAndResetBB()
  staging: rtl8723au: _DisableRFAFEAndResetBB8192C(): Reduce code obfuscation
  ...
2014-12-15 18:06:13 -08:00
Markus Elfring 13cb076d30 lustre: Deletion of unnecessary checks before three function calls
The functions free_ll_remote_perm(), free_rmtperm_hash() and iput() test
whether their argument is NULL and then return immediately.
Thus the test around their calls is not needed.

This issue was detected by using the Coccinelle software.

Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:52:37 -08:00
Vincenzo Scotti 450b31a9d0 staging: lustre: fix sparse warnings: static function declaration
Signed-off-by: Vincenzo Scotti <vinc94@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:52:37 -08:00
Janet Liu 60ebee3bcf staging: lustre: fixed sparse warnings related to static declarations
drivers/staging/lustre/lustre/mdc/mdc_request.c:63:5: warning: symbol 'mdc_unpack_capa' was not declared. Should it be static?
drivers/staging/lustre/lustre/mdc/mdc_request.c:150:5: warning: symbol 'mdc_getstatus' was not declared. Should it be static?
drivers/staging/lustre/lustre/mdc/mdc_request.c:217:5: warning: symbol 'mdc_getattr' was not declared. Should it be static?
drivers/staging/lustre/lustre/mdc/mdc_request.c:261:5: warning: symbol 'mdc_getattr_name' was not declared. Should it be static?
drivers/staging/lustre/lustre/mdc/mdc_request.c:444:5: warning: symbol 'mdc_setxattr' was not declared. Should it be static?
drivers/staging/lustre/lustre/mdc/mdc_request.c:455:5: warning: symbol 'mdc_getxattr' was not declared. Should it be static?

Signed-off-by: Janet Liu <jianhua.ljh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-12-02 16:52:36 -08:00
Andreas Ruprecht 4d089bb4e7 staging: lustre: ldlm: Remove space before braces for defined() check
checkpatch complains about two places where a space is prohibited
before the braces for in "#if defined()" check. This patch removes
these warnings.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:51:29 -08:00
Andreas Ruprecht 8d2ff65da8 staging: lustre: ldlm: Remove unnecessary braces at ifs
checkpatch complains about three places where braces are not
necessary. This patch removes the braces.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:51:29 -08:00
Andreas Ruprecht b0e47b96e3 staging: lustre: ldlm: Remove unnecessary line continuations
checkpatch finds two unnecessary line continuations in ldlm_lockd.c
which are removed by this patch.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:50:27 -08:00
Andreas Ruprecht fd0c587aa9 staging: lustre: ldlm: Fix warning about unneeded return statement
checkpatch complains about an unneeded return statement in the
function search_granted_lock(), which is removed by this patch.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:50:27 -08:00
Andreas Ruprecht 9844f9c9b4 staging: lustre: ldlm: Fix initialization of static variables
checkpatch complains about static variables being initialized to 0
which is unnecessary. This patch removes the initialization.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:50:27 -08:00
Andreas Ruprecht 0e1bbbb030 staging: lustre: ldlm: Fix indentation errors for switch-case
checkpatch complains about two indentation errors where the case
statements are on a higher indentation level than the corresponding
switch statement. This patch removes these errors.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:50:27 -08:00
Andreas Ruprecht 43ee4160bb staging: lustre: ldlm: Fix warning about missing spaces
checkpatch.pl complains about a number of places where spaces were
missing. This patch fixes all of these errors.

For better readability, the warning of hitting the 80 character per
line limit in line 1349 introduced by this change is ignored
deliberately.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:50:27 -08:00
Andreas Ruprecht e7ddc48c10 staging: lustre: ldlm: Fix overlong lines
checkpatch complains about a number of lines which are over the
80 character line limit. This patch changes most of them to comply,
the few remaining lines with warnings are not changed for readability
reasons.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:49:32 -08:00
Andreas Ruprecht 902f3bb1ef staging: lustre: ldlm: Add missing newlines after declarations
checkpatch.pl complains about a number of missing newlines after
declarations. This patch gets rid of these warnings.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:49:32 -08:00
Giedrius Statkevicius 2595fa367f staging: lustre: Fix sparse warnings for lnet/lnet/router.c
Fix the following sparse errors:
drivers/staging/lustre/lnet/lnet/router.c:756:1: warning: symbol 'lnet_wait_known_routerstate' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:788:1: warning: symbol 'lnet_update_ni_status_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:828:1: warning: symbol 'lnet_destroy_rc_data' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:848:16: warning: symbol 'lnet_create_rc_data_locked' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1228:1: warning: symbol 'lnet_destroy_rtrbuf' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1238:15: warning: symbol 'lnet_new_rtrbuf' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1274:1: warning: symbol 'lnet_rtrpool_free_bufs' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1303:1: warning: symbol 'lnet_rtrpool_alloc_bufs' was not declared. Should it be static?
drivers/staging/lustre/lnet/lnet/router.c:1337:1: warning: symbol 'lnet_rtrpool_init' was not declared. Should it be static?

Signed-off-by: Giedrius Statkevicius <giedriuswork@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-26 12:35:23 -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
Juston Li 962dbfd614 staging: lustre: mdc: use __FMODE_EXEC macro
FMODE_EXEC is type fmode_t but is used in operations
with integers which leads to sparse warnings:
drivers/staging/lustre/lustre/mdc/mdc_lib.c:198:21: warning: restricted fmode_t degrades to integer
drivers/staging/lustre/lustre/mdc/mdc_locks.c:300:49: warning: restricted fmode_t degrades to integer

Fix by using __FMODE_EXEC macro defined in fs.h.

Note the same warnings occurs with other fmode flags
here but they don't have a corresponding int macro.

Changes since v1:
remove ifdefs. FMODE_EXEC and __FMODE_EXEC should
always be defined in fs.h

Signed-off-by: Juston Li <juston.h.li@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 11:02:22 -08:00
Thomas Wood 565f3d2fd0 drivers: staging: lustre: lnet: api-nc.c: Fix Style Warnings
Remove an unecessary return statement in a void function.
Remove an unecessary space between a function name and the parentheses.

Signed-off-by: Thomas Wood <tommyandrena@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 11:01:21 -08:00
Balavasu Kuppusammyprathaban 3ff2804997 staging: lustre: lustre: ptlrpc: Remove unnecessary braces
Fixes the following checkpatch warning:
WARNING: braces {} are not necessary for single statement blocks

Signed-off-by: Balavasu Kuppusammyprathaban <kp.balavasu@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 11:01:21 -08:00
Julia Lawall 71583c3ef0 staging: lustre: libcfs_debug.h: remove final uses of the GOTO macro
Remove the GOTO macro, as it is no longer used.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:55:00 -08:00
Julia Lawall b4f0065ed3 staging: lustre: libcfs: remove final uses of the GOTO macro
Remove the goto logging function, as it is no longer used.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:55:00 -08:00
Julia Lawall 490e0e898b staging: lustre: osc: remove final uses of the GOTO macro
The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
identifier lbl;
identifier rc;
constant c;
@@

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

@@
identifier lbl;
expression rc;
@@

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

In one case (OES_INV), consecutive gotos were factorized and a break was
removed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:55:00 -08:00
Chen Gang 9d9b211fcf drivers: staging: lustre: Kconfig: Let LUSTRE_LLITE_LLOOP depend on all !"*_64K*" page
It does not support 64K page, so let it disabled for 64K page under all
architectures. The related error (with allmodconfig under tile):

    CC [M]  drivers/staging/lustre/lustre/llite/lloop.o
  In file included from drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs.h:160:0,
                   from drivers/staging/lustre/lustre/llite/../include/lustre_lib.h:52,
                   from drivers/staging/lustre/lustre/llite/lloop.c:106:
  drivers/staging/lustre/lustre/llite/lloop.c: In function 'loop_set_fd':
  drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs_private.h:411:54: error: duplicate case value
   #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
                                                        ^
  drivers/staging/lustre/lustre/llite/lloop.c:525:2: note: in expansion of macro 'CLASSERT'
    CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
    ^
  drivers/staging/lustre/lustre/llite/../include/../../include/linux/libcfs/libcfs_private.h:411:41: error: previously used here
   #define CLASSERT(cond) do {switch (42) {case (cond): case 0: break; } } while (0)
                                           ^
  drivers/staging/lustre/lustre/llite/lloop.c:525:2: note: in expansion of macro 'CLASSERT'
    CLASSERT(PAGE_CACHE_SIZE < (1 << (sizeof(unsigned short) * 8)));
    ^

Use "find ./ | grep Kconfig | xargs grep --color 64K" to find all 64K
page macros.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:53:09 -08:00
Masanari Iida dbd18138a0 staging: lustre: Remove unnecessary parentheses.
This patch remove unnecessary parentheses.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:53:09 -08:00
Masanari Iida a86a659fb6 staging: lustre: Remove unnecessary semicolon
This patch remove unnecessary semicolons from macro.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-22 10:53:09 -08:00
Al Viro e63fa0d458 Merge branch 'for-lustre' into for-next 2014-11-19 13:01:59 -05:00
Al Viro b583043e99 kill f_dentry uses
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-19 13:01:25 -05:00
Vaishali Thakkar 8c4f136497 Staging: lustre: Use put_unaligned_le64
This patch introduces the use of function put_unaligned_le64.

This is done using Coccinelle and semantic patch used is as follows:

@@ identifier tmp; expression ptr; expression y,e; type T; @@

- tmp = cpu_to_le64(y);

  <+... when != tmp
- memcpy(ptr, (T)&tmp, ...);
+ put_unaligned_le64(y,ptr);
  ...+>
? tmp = e

@@ type T; identifier tmp; @@

- T tmp;
...when != tmp

Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:08:06 -08:00
Tina Ruchandani 11dd2a979a Staging: lustre: lnet: Improve 'incarnation' stamp
ksock_net_t uses a __u64 quantity as an 'incarnation' timestamp. This is also
passed on in hello messages and used to detect if a reboot has occurred.
This 'incarnation' is obtained using do_gettimeofday.It is only used in equality
checks, so the absolute value does not matter.

This patch replaces do_gettimeofday with ktime_get_ns for the following reasons:
1. ktime_get_ns returns a __u64 which is safer than 'struct timeval'
which will overflow on 32-bit systems in year 2038 and beyond.
2. Reduced compute: ktime_get_ns is faster than the multiply/add
   combination used in this function

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-03 16:08:06 -08:00
Al Viro f76c23daac lustre: use is_root_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:19 -05:00
Al Viro fd5c6c36a2 lustre: get rid of duplicate mountpoint checks
VFS has already done them

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:18 -05:00
Al Viro 59cc93ef27 kill ll_link_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:18 -05:00
Al Viro ea4df502dc ll_get_child_fid(): callers already have the child
no need to bother with d_lookup()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:17 -05:00
Al Viro 78851093c0 kill ll_rename_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:17 -05:00
Al Viro 521f2ad7b6 kill ll_unlink_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:16 -05:00
Al Viro 55dec6171f kill ll_rmdir_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:16 -05:00
Al Viro b2037bb62b ll_new_inode(): don't bother with name - it's always &dentry->d_name
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:15 -05:00
Al Viro 60dd654e33 kill ll_symlink_generic()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:15 -05:00
Al Viro 7c2f909400 kill ll_mkdir_generic()
fold into ll_mkdir()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:14 -05:00
Al Viro d6689e5ffe kill ll_mknod_generic()
just fold into ll_mknod()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:14 -05:00
Al Viro e22fdcc8d7 lustre: switch ll_release_openhandle() to struct inode *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:13 -05:00
Al Viro 2a8a3597aa lustre: use file_inode()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:13 -05:00
Al Viro 09561a53b5 lustre: use %p[dD]
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:12 -05:00
Al Viro 74d01958a7 lustre: opened file can't have negative dentry
... and ll_md_close() gets inode already equal to file_inode(file),
along with ll_file_release()

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:12 -05:00
Al Viro c139f3cef3 ll_setxattr(): get rid of struct file on stack
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:11 -05:00
Al Viro 48eddfd5ca lustre: switch ll_intent_file_open() to struct dentry *
... because fake struct file is wrong.

ll_prep_inode() in there is an atrocity - despite passing a pointer to
inode by address, it actually only uses the value when that value is
non-NULL, as it will be here.

Oh, and ->d_parent of anything is never NULL.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:21:11 -05:00
Al Viro 946e51f2bf move d_rcu from overlapping d_child to overlapping d_alias
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03 15:20:29 -05:00
Miklos Szeredi ac7576f4b1 vfs: make first argument of dir_context.actor typed
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-10-31 17:48:54 -04:00
Tina Ruchandani 9056be3054 Staging: lustre: lnet: lnet: Better cookie gen
api-ni.c uses do_gettimeofday to get a 'cookie' or timestamp.
This patch replaces it with ktime_get_ns for the following reasons:
1. ktime_get_ns returns a __u64 which is safer than 'struct timeval'
which will overflow on 32-bit systems in year 2038 and beyond.
2. Improved resolution: nsecs instead of usecs.
3. Reduced compute: ktime_get_ns is faster than the multiply/add
   combination used in this function

Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com>
Suggested-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-30 14:41:59 -07:00