aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/lustre/lustre/llite/xattr.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-12-15Merge tag 'staging-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/stagingLinus Torvalds1-2/+4
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-11-23staging: lustre: Coalesce string fragmentsJoe Perches1-2/+1
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-03lustre: use %p[dD]Al Viro1-2/+2
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-11-03ll_setxattr(): get rid of struct file on stackAl Viro1-4/+1
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2014-10-29staging: lustre: validate size in ll_setxattr()Dan Carpenter1-0/+3
If size is smaller than the lov_user_md struct then we are reading beyond the end of the buffer. I guess this is an information leak or it could cause an Oops if the memory is not mapped. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30staging: lustre: llite: expand the GOTO macroJulia Lawall1-19/+32
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-30staging: lustre: remove parentheses from return argumentsJulia Lawall1-1/+1
The semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier i; constant c; @@ return - ( \(i\|-i\|i(...)\|c\) - ) ; // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-11staging: lustre: llite: remove ccflags from MakefileGreg Kroah-Hartman1-5/+5
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-06-26staging/lustre/llite: Fix uninitialized variableDmitry Eremin1-0/+1
'f.f_flags' might be used uninitialized in this function. xattr.c:248: 'f.f_flags' is declared. xattr.c:244: lump!= ( (void* )0) is true xattr.c:254: 'f.f_flags' is used, but is uninitialized. Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-on: http://review.whamcloud.com/10663 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4629 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-05-03staging/lustre/llite: Fix unused variable warning if !CONFIG_FS_POSIX_ACLGeert Uytterhoeven1-1/+1
If CONFIG_FS_POSIX_ACL=n: drivers/staging/lustre/lustre/llite/xattr.c: In function 'll_setxattr_common': drivers/staging/lustre/lustre/llite/xattr.c:115:27: warning: unused variable 'rce' [-Wunused-variable] Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-27staging/lustre: fix permission problem of setfaclLi Xi1-0/+5
Setxattr does not check the permission when setting ACL xattrs. This will cause security problem because any user can walk around permission checking by changing ACL rules. Signed-off-by: Li Xi <lixi@ddn.com> Reviewed-on: http://review.whamcloud.com/9473 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4704 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-11lustre/xattr: separate ACL and XATTR cachesAndrew Perepechko1-10/+19
This patch separates ACL and XATTR caches, so that when updating an ACL only LOOKUP lock is needed and when updating another XATTR only XATTR lock is needed. This patch also reverts XATTR cache support for setxattr because client performing REINT under even PR lock will deadlock if an active server operation (like unlink) attempts to cancel all locks, and setxattr has to wait for it (MDC max-in-flight is 1). This patch disables the r/o cache if the data is unreasonably large (larger than maximum single EA size). Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com> Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com> Reviewed-on: http://review.whamcloud.com/7208 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3669 Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Signed-off-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-02-07staging/lustre/libcfs: remove cfs_capablePeng Tao1-1/+1
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-12-04staging/lustre: fix build error in ll_setxattr_commonPeng Tao1-1/+1
With CONFIG_FS_POSIX_ACL off, we'll get drivers/staging/lustre/lustre/llite/xattr.c: In function ‘ll_setxattr_common’: drivers/staging/lustre/lustre/llite/xattr.c:187:7: error: ‘rce’ undeclared (first use in this function) drivers/staging/lustre/lustre/llite/xattr.c:187:7: note: each undeclared identifier is reported only once for each function it appears in It was introduced by 7fc1f83 (staging/lustre/llite: extended attribute cache) that added new reference but didn't take care of CONFIG_FS_POSIX_ACL. Reported-by: Fengguang Wu <fengguang.wu@intel.com> 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-12-03staging/lustre/llite: extended attribute cacheAndrew Perepechko1-45/+57
This patch implements an extended attribute cache for a Lustre client. It is organized as a write-through cache: reads are performed from cache, updates are sent synchronously to the MDS. An additional inode bit MDS_INODELOCK_XATTR is added to protect the cache. Lustre-change: http://review.whamcloud.com/5537 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-2869 Signed-off-by: Andrew Perepechko <andrew_perepechko@xyratex.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> [remove extra GPL notice in original patch as kernel already has one and it causes checkpatch error. -- Peng Tao] 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>
2013-08-03staging: lustre: remove RETURN macroGreg Kroah-Hartman1-18/+18
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-03staging: lustre: remove EXIT macroGreg Kroah-Hartman1-1/+0
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-Hartman1-2/+0
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-07-23staging/lustre/llite: error of listxattr when buffer is smallKeith Mannthey1-1/+6
According to the standard, listxattr(2) should return -1 and errno should be set to ERANGE if the size of the list buffer is too small to hold the result. However ll_listxattr() will return a value bigger than the size of buffer in some cases. Let's assume listxattr(2) returns SIZE when it is called with a large enough list buffer. If it's called again with a list buffer whose size is smaller than SIZE but bigger than (SIZE - 12), then listxattr(2) will return SIZE too. This patch fixes the problem. Original patch by Li Xi <pkuelelixi@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3403 Lustre-change: http://review.whamcloud.com/6463 Signed-off-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Li Xi <pkuelelixi@gmail.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging/lustre/llite: fix build erorr if CONFIG_FS_POSIX_ACL is offPeng Tao1-0/+2
Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-05-14staging: add Lustre file system client supportPeng Tao1-0/+578
Lustre is the most deployed distributed file system in the HPC (High Performance Computing) world. The patch adds its client side support. The code is not very clean and needs to live in drivers/staging for some time for continuing cleanup work. See drivers/staging/lustre/TODO for details. The code is based on Lustre master commit faefbfc04 commit faefbfc0460bc00f2ee4c1c1c86aa1e39b9eea49 Author: Alex Zhuravlev <alexey.zhuravlev@intel.com> Date: Tue Apr 30 23:05:21 2013 +0400 LU-3244 utils: tunefs.lustre should preserve virgin label Plus a few under-review patches on Whamcloud gerrit: 3.8 kernel support: http://review.whamcloud.com/#change,5973 http://review.whamcloud.com/#change,5974 http://review.whamcloud.com/#change,5768 http://review.whamcloud.com/#change,5781 http://review.whamcloud.com/#change,5763 http://review.whamcloud.com/#change,5613 http://review.whamcloud.com/#change,5655 3.9 kernel support: http://review.whamcloud.com/#change,5898 http://review.whamcloud.com/#change,5899 Kconfig/Kbuild: http://review.whamcloud.com/#change,4646 http://review.whamcloud.com/#change,4644 libcfs cleanup: http://review.whamcloud.com/#change,2831 http://review.whamcloud.com/#change,4775 http://review.whamcloud.com/#change,4776 http://review.whamcloud.com/#change,4777 http://review.whamcloud.com/#change,4778 http://review.whamcloud.com/#change,4779 http://review.whamcloud.com/#change,4780 All starting/trailing whitespaces are removed, to match kernel coding style. Also ran scripts/cleanfile on all lustre source files. [maked the Kconfig depend on BROKEN as the recent procfs changes causes this to fail - gregkh] Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>