Close some bugs
[pkg-k5-afs_openafs.git] / debian / patches / Reformat-src-afs-LINUX-osi_vcache.c.patch
blobee03ba9e17df32663e848ce2fc14a5a9f56596fc
1 From f31b673509664714b146f23be069b69be7e1ac89 Mon Sep 17 00:00:00 2001
2 From: Benjamin Kaduk <kaduk@mit.edu>
3 Date: Thu, 27 Oct 2016 17:27:26 -0500
4 Subject: Reformat src/afs/LINUX/osi_vcache.c
6 Apply the GNU indent options from CODING, with manual adjustments
7 to leave jump labels in column zero.
9 Also rename and mark static a function-local helper function.
11 Reviewed-on: https://gerrit.openafs.org/12422
12 Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
13 Tested-by: BuildBot <buildbot@rampaginggeek.com>
14 (cherry picked from commit 22933e02e2510f25b79230964f135571c7bfe710)
16 Change-Id: I9fb2886ae2213218ae80ea9d5b80540b9c79077b
17 ---
18 src/afs/LINUX/osi_vcache.c | 23 ++++++++++++++---------
19 1 file changed, 14 insertions(+), 9 deletions(-)
21 diff --git a/src/afs/LINUX/osi_vcache.c b/src/afs/LINUX/osi_vcache.c
22 index 3682bdc29..bc74b6744 100644
23 --- a/src/afs/LINUX/osi_vcache.c
24 +++ b/src/afs/LINUX/osi_vcache.c
25 @@ -10,13 +10,13 @@
26 #include <afsconfig.h>
27 #include "afs/param.h"
29 -#include "afs/sysincludes.h" /*Standard vendor system headers */
30 -#include "afsincludes.h" /*AFS-based standard headers */
31 +#include "afs/sysincludes.h" /*Standard vendor system headers */
32 +#include "afsincludes.h" /*AFS-based standard headers */
34 #include "osi_compat.h"
36 -void
37 -osi_TryEvictDentries(struct vcache *avc)
38 +static void
39 +TryEvictDentries(struct vcache *avc)
41 struct dentry *dentry;
42 struct inode *inode = AFSTOV(avc);
43 @@ -95,7 +95,7 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep)
44 ReleaseWriteLock(&afs_xvcache);
45 AFS_GUNLOCK();
47 - osi_TryEvictDentries(avc);
48 + TryEvictDentries(avc);
50 AFS_GLOCK();
51 ObtainWriteLock(&afs_xvcache, 733);
52 @@ -103,7 +103,7 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep)
55 /* See if we can evict it from the VLRUQ */
56 - if (VREFCOUNT_GT(avc,0) && !VREFCOUNT_GT(avc,1) && avc->opens == 0
57 + if (VREFCOUNT_GT(avc, 0) && !VREFCOUNT_GT(avc, 1) && avc->opens == 0
58 && (avc->f.states & CUnlinkedDel) == 0) {
59 int didsleep = *slept;
61 @@ -145,17 +145,22 @@ osi_NewVnode(void)
64 void
65 -osi_PrePopulateVCache(struct vcache *avc) {
66 +osi_PrePopulateVCache(struct vcache *avc)
68 avc->uncred = 0;
69 memset(&(avc->f), 0, sizeof(struct fvcache));
70 avc->cred = NULL;
73 void
74 -osi_AttachVnode(struct vcache *avc, int seq) { /* Nada */ }
75 +osi_AttachVnode(struct vcache *avc, int seq)
77 + /* Nada */
80 void
81 -osi_PostPopulateVCache(struct vcache *avc) {
82 +osi_PostPopulateVCache(struct vcache *avc)
84 vSetType(avc, VREG);
87 --
88 2.11.0