/[gentoo-x86]/sys-kernel/linux-extras/files/2.4.6-r2/linux-2.4.6-reiserfs-NFS.patch
Gentoo

Contents of /sys-kernel/linux-extras/files/2.4.6-r2/linux-2.4.6-reiserfs-NFS.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download) (as text)
Fri Oct 12 03:59:48 2001 UTC (18 years, 7 months ago) by drobbins
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
File MIME type: text/x-diff
FILE REMOVED
massive cleanup

1 diff -u --recursive --new-file linux-2.4.6-file/fs/nfs/inode.c linux-2.4.6-mmap/fs/nfs/inode.c
2 --- linux-2.4.6-file/fs/nfs/inode.c Wed Jul 4 17:30:28 2001
3 +++ linux-2.4.6-mmap/fs/nfs/inode.c Wed Jul 4 20:48:01 2001
4 @@ -48,6 +48,7 @@
5 static void nfs_write_inode(struct inode *,int);
6 static void nfs_delete_inode(struct inode *);
7 static void nfs_put_super(struct super_block *);
8 +static void nfs_clear_inode(struct inode *);
9 static void nfs_umount_begin(struct super_block *);
10 static int nfs_statfs(struct super_block *, struct statfs *);
11
12 @@ -57,6 +58,7 @@
13 delete_inode: nfs_delete_inode,
14 put_super: nfs_put_super,
15 statfs: nfs_statfs,
16 + clear_inode: nfs_clear_inode,
17 umount_begin: nfs_umount_begin,
18 };
19
20 @@ -141,6 +143,21 @@
21 clear_inode(inode);
22 }
23
24 +/*
25 + * For the moment, the only task for the NFS clear_inode method is to
26 + * release the mmap credential
27 + */
28 +static void
29 +nfs_clear_inode(struct inode *inode)
30 +{
31 + struct rpc_cred *cred = NFS_I(inode)->mm_cred;
32 +
33 + if (cred) {
34 + put_rpccred(cred);
35 + NFS_I(inode)->mm_cred = 0;
36 + }
37 +}
38 +
39 void
40 nfs_put_super(struct super_block *sb)
41 {
42 @@ -600,7 +617,6 @@
43 inode->i_ctime = nfs_time_to_secs(fattr->ctime);
44 NFS_CACHE_CTIME(inode) = fattr->ctime;
45 NFS_CACHE_MTIME(inode) = fattr->mtime;
46 - NFS_CACHE_ATIME(inode) = fattr->atime;
47 NFS_CACHE_ISIZE(inode) = fattr->size;
48 NFS_ATTRTIMEO(inode) = NFS_MINATTRTIMEO(inode);
49 NFS_ATTRTIMEO_UPDATE(inode) = jiffies;
50 @@ -794,6 +810,20 @@
51 }
52
53 /*
54 + * Ensure that mmap has a recent RPC credential for use when writing out
55 + * shared pages
56 + */
57 +static inline void
58 +nfs_set_mmcred(struct inode *inode, struct rpc_cred *cred)
59 +{
60 + struct rpc_cred *oldcred = NFS_I(inode)->mm_cred;
61 +
62 + NFS_I(inode)->mm_cred = get_rpccred(cred);
63 + if (oldcred)
64 + put_rpccred(oldcred);
65 +}
66 +
67 +/*
68 * These are probably going to contain hooks for
69 * allocating and releasing RPC credentials for
70 * the file. I'll have to think about Tronds patch
71 @@ -808,20 +838,20 @@
72 auth = NFS_CLIENT(inode)->cl_auth;
73 cred = rpcauth_lookupcred(auth, 0);
74 filp->private_data = cred;
75 + if (filp->f_mode & FMODE_WRITE)
76 + nfs_set_mmcred(inode, cred);
77 unlock_kernel();
78 return 0;
79 }
80
81 int nfs_release(struct inode *inode, struct file *filp)
82 {
83 - struct rpc_auth *auth;
84 struct rpc_cred *cred;
85
86 lock_kernel();
87 - auth = NFS_CLIENT(inode)->cl_auth;
88 cred = nfs_file_cred(filp);
89 if (cred)
90 - rpcauth_releasecred(auth, cred);
91 + put_rpccred(cred);
92 unlock_kernel();
93 return 0;
94 }
95 @@ -976,7 +1006,6 @@
96 NFS_CACHE_CTIME(inode) = fattr->ctime;
97 inode->i_ctime = nfs_time_to_secs(fattr->ctime);
98
99 - NFS_CACHE_ATIME(inode) = fattr->atime;
100 inode->i_atime = nfs_time_to_secs(fattr->atime);
101
102 NFS_CACHE_MTIME(inode) = new_mtime;
103 diff -u --recursive --new-file linux-2.4.6-file/fs/nfs/unlink.c linux-2.4.6-mmap/fs/nfs/unlink.c
104 --- linux-2.4.6-file/fs/nfs/unlink.c Fri Feb 9 20:29:44 2001
105 +++ linux-2.4.6-mmap/fs/nfs/unlink.c Wed Jul 4 20:48:47 2001
106 @@ -128,7 +128,7 @@
107 dir_i = dir->d_inode;
108 nfs_zap_caches(dir_i);
109 NFS_PROTO(dir_i)->unlink_done(dir, &task->tk_msg);
110 - rpcauth_releasecred(task->tk_auth, data->cred);
111 + put_rpccred(data->cred);
112 data->cred = NULL;
113 dput(dir);
114 }
115 diff -u --recursive --new-file linux-2.4.6-file/fs/nfs/write.c linux-2.4.6-mmap/fs/nfs/write.c
116 --- linux-2.4.6-file/fs/nfs/write.c Mon May 21 21:29:14 2001
117 +++ linux-2.4.6-mmap/fs/nfs/write.c Wed Jul 4 20:48:24 2001
118 @@ -181,7 +181,9 @@
119
120
121 if (file)
122 - cred = nfs_file_cred(file);
123 + cred = get_rpccred(nfs_file_cred(file));
124 + if (!cred)
125 + cred = get_rpccred(NFS_I(inode)->mm_cred);
126
127 dprintk("NFS: nfs_writepage_sync(%x/%Ld %d@%Ld)\n",
128 inode->i_dev, (long long)NFS_FILEID(inode),
129 @@ -226,6 +228,8 @@
130
131 io_error:
132 kunmap(page);
133 + if (cred)
134 + put_rpccred(cred);
135
136 return written? written : result;
137 }
138 @@ -241,6 +245,9 @@
139 status = (IS_ERR(req)) ? PTR_ERR(req) : 0;
140 if (status < 0)
141 goto out;
142 + if (!req->wb_cred)
143 + req->wb_cred = get_rpccred(NFS_I(inode)->mm_cred);
144 + nfs_unlock_request(req);
145 nfs_release_request(req);
146 nfs_strategy(inode);
147 out:
148 @@ -557,13 +564,11 @@
149 req->wb_bytes = count;
150 req->wb_file = file;
151
152 - /* If we have a struct file, use its cached credentials
153 - * else cache the current process' credentials. */
154 + /* If we have a struct file, use its cached credentials */
155 if (file) {
156 get_file(file);
157 req->wb_cred = nfs_file_cred(file);
158 - } else
159 - req->wb_cred = rpcauth_lookupcred(NFS_CLIENT(inode)->cl_auth, 0);
160 + }
161 req->wb_inode = inode;
162 req->wb_count = 1;
163
164 @@ -608,8 +613,8 @@
165 /* Release struct file or cached credential */
166 if (req->wb_file)
167 fput(req->wb_file);
168 - else
169 - rpcauth_releasecred(NFS_CLIENT(inode)->cl_auth, req->wb_cred);
170 + else if (req->wb_cred)
171 + put_rpccred(req->wb_cred);
172 page_cache_release(page);
173 nfs_page_free(req);
174 /* wake up anyone waiting to allocate a request */
175 @@ -927,8 +932,6 @@
176 if (end > rqend)
177 req->wb_bytes = end - req->wb_offset;
178
179 - nfs_unlock_request(req);
180 -
181 return req;
182 }
183
184 @@ -1049,6 +1052,7 @@
185 goto done;
186
187 status = 0;
188 + nfs_unlock_request(req);
189 /* If we wrote past the end of the page.
190 * Call the strategy routine so it can send out a bunch
191 * of requests.
192 diff -u --recursive --new-file linux-2.4.6-file/include/linux/nfs_fs.h linux-2.4.6-mmap/include/linux/nfs_fs.h
193 --- linux-2.4.6-file/include/linux/nfs_fs.h Sat May 26 03:02:11 2001
194 +++ linux-2.4.6-mmap/include/linux/nfs_fs.h Wed Jul 4 17:32:16 2001
195 @@ -63,6 +63,11 @@
196 */
197 #define NFS_SUPER_MAGIC 0x6969
198
199 +static inline struct nfs_inode_info *NFS_I(struct inode *inode)
200 +{
201 + return &inode->u.nfs_i;
202 +}
203 +
204 #define NFS_FH(inode) (&(inode)->u.nfs_i.fh)
205 #define NFS_SERVER(inode) (&(inode)->i_sb->u.nfs_sb.s_server)
206 #define NFS_CLIENT(inode) (NFS_SERVER(inode)->client)
207 @@ -74,7 +79,6 @@
208 #define NFS_READTIME(inode) ((inode)->u.nfs_i.read_cache_jiffies)
209 #define NFS_CACHE_CTIME(inode) ((inode)->u.nfs_i.read_cache_ctime)
210 #define NFS_CACHE_MTIME(inode) ((inode)->u.nfs_i.read_cache_mtime)
211 -#define NFS_CACHE_ATIME(inode) ((inode)->u.nfs_i.read_cache_atime)
212 #define NFS_CACHE_ISIZE(inode) ((inode)->u.nfs_i.read_cache_isize)
213 #define NFS_NEXTSCAN(inode) ((inode)->u.nfs_i.nextscan)
214 #define NFS_CACHEINV(inode) \
215 diff -u --recursive --new-file linux-2.4.6-file/include/linux/nfs_fs_i.h linux-2.4.6-mmap/include/linux/nfs_fs_i.h
216 --- linux-2.4.6-file/include/linux/nfs_fs_i.h Thu May 31 15:27:10 2001
217 +++ linux-2.4.6-mmap/include/linux/nfs_fs_i.h Wed Jul 4 17:32:16 2001
218 @@ -45,7 +45,6 @@
219 unsigned long read_cache_jiffies;
220 __u64 read_cache_ctime;
221 __u64 read_cache_mtime;
222 - __u64 read_cache_atime;
223 __u64 read_cache_isize;
224 unsigned long attrtimeo;
225 unsigned long attrtimeo_timestamp;
226 @@ -73,6 +72,9 @@
227 struct inode *hash_next,
228 *hash_prev;
229 unsigned long nextscan;
230 +
231 + /* Credentials for shared mmap */
232 + struct rpc_cred *mm_cred;
233 };
234
235 /*
236 diff -u --recursive --new-file linux-2.4.6-file/include/linux/sunrpc/auth.h linux-2.4.6-mmap/include/linux/sunrpc/auth.h
237 --- linux-2.4.6-file/include/linux/sunrpc/auth.h Fri Jun 22 19:30:22 2001
238 +++ linux-2.4.6-mmap/include/linux/sunrpc/auth.h Wed Jul 4 20:51:35 2001
239 @@ -14,6 +14,8 @@
240 #include <linux/config.h>
241 #include <linux/sunrpc/sched.h>
242
243 +#include <asm/atomic.h>
244 +
245 /* size of the nodename buffer */
246 #define UNX_MAXNODENAME 32
247
248 @@ -22,8 +24,10 @@
249 */
250 struct rpc_cred {
251 struct rpc_cred * cr_next; /* linked list */
252 + struct rpc_auth * cr_auth;
253 + struct rpc_credops * cr_ops;
254 unsigned long cr_expire; /* when to gc */
255 - unsigned short cr_count; /* ref count */
256 + atomic_t cr_count; /* ref count */
257 unsigned short cr_flags; /* various flags */
258 #ifdef RPC_DEBUG
259 unsigned long cr_magic; /* 0x0f4aa4f0 */
260 @@ -71,6 +75,9 @@
261 void (*destroy)(struct rpc_auth *);
262
263 struct rpc_cred * (*crcreate)(int);
264 +};
265 +
266 +struct rpc_credops {
267 void (*crdestroy)(struct rpc_cred *);
268
269 int (*crmatch)(struct rpc_cred *, int);
270 @@ -92,8 +99,7 @@
271 struct rpc_cred * rpcauth_lookupcred(struct rpc_auth *, int);
272 struct rpc_cred * rpcauth_bindcred(struct rpc_task *);
273 void rpcauth_holdcred(struct rpc_task *);
274 -void rpcauth_releasecred(struct rpc_auth *,
275 - struct rpc_cred *);
276 +void put_rpccred(struct rpc_cred *);
277 void rpcauth_unbindcred(struct rpc_task *);
278 int rpcauth_matchcred(struct rpc_auth *,
279 struct rpc_cred *, int);
280 @@ -106,6 +112,13 @@
281 void rpcauth_free_credcache(struct rpc_auth *);
282 void rpcauth_insert_credcache(struct rpc_auth *,
283 struct rpc_cred *);
284 +
285 +static inline
286 +struct rpc_cred * get_rpccred(struct rpc_cred *cred)
287 +{
288 + atomic_inc(&cred->cr_count);
289 + return cred;
290 +}
291
292 #endif /* __KERNEL__ */
293 #endif /* _LINUX_SUNRPC_AUTH_H */
294 diff -u --recursive --new-file linux-2.4.6-file/net/sunrpc/auth.c linux-2.4.6-mmap/net/sunrpc/auth.c
295 --- linux-2.4.6-file/net/sunrpc/auth.c Fri Feb 9 20:29:44 2001
296 +++ linux-2.4.6-mmap/net/sunrpc/auth.c Wed Jul 4 20:51:04 2001
297 @@ -81,42 +81,61 @@
298 auth->au_nextgc = jiffies + (auth->au_expire >> 1);
299 }
300
301 +/*
302 + * Destroy an unreferenced credential
303 + */
304 static inline void
305 -rpcauth_crdestroy(struct rpc_auth *auth, struct rpc_cred *cred)
306 +rpcauth_crdestroy(struct rpc_cred *cred)
307 {
308 #ifdef RPC_DEBUG
309 if (cred->cr_magic != RPCAUTH_CRED_MAGIC)
310 BUG();
311 cred->cr_magic = 0;
312 + if (atomic_read(&cred->cr_count) || cred->cr_auth)
313 + BUG();
314 #endif
315 - if (auth->au_ops->crdestroy)
316 - auth->au_ops->crdestroy(cred);
317 - else
318 - rpc_free(cred);
319 + cred->cr_ops->crdestroy(cred);
320 }
321
322 /*
323 - * Clear the RPC credential cache
324 + * Destroy a list of credentials
325 + */
326 +static inline
327 +void rpcauth_destroy_credlist(struct rpc_cred *head)
328 +{
329 + struct rpc_cred *cred;
330 +
331 + while ((cred = head) != NULL) {
332 + head = cred->cr_next;
333 + rpcauth_crdestroy(cred);
334 + }
335 +}
336 +
337 +/*
338 + * Clear the RPC credential cache, and delete those credentials
339 + * that are not referenced.
340 */
341 void
342 rpcauth_free_credcache(struct rpc_auth *auth)
343 {
344 - struct rpc_cred **q, *cred;
345 - void (*destroy)(struct rpc_cred *);
346 + struct rpc_cred **q, *cred, *free = NULL;
347 int i;
348
349 - if (!(destroy = auth->au_ops->crdestroy))
350 - destroy = (void (*)(struct rpc_cred *)) rpc_free;
351 -
352 spin_lock(&rpc_credcache_lock);
353 for (i = 0; i < RPC_CREDCACHE_NR; i++) {
354 q = &auth->au_credcache[i];
355 while ((cred = *q) != NULL) {
356 *q = cred->cr_next;
357 - destroy(cred);
358 + cred->cr_auth = NULL;
359 + if (atomic_read(&cred->cr_count) == 0) {
360 + cred->cr_next = free;
361 + free = cred;
362 + } else
363 + cred->cr_next = NULL;
364 }
365 }
366 spin_unlock(&rpc_credcache_lock);
367 + rpcauth_destroy_credlist(free);
368 }
369
370 /*
371 @@ -133,9 +152,10 @@
372 for (i = 0; i < RPC_CREDCACHE_NR; i++) {
373 q = &auth->au_credcache[i];
374 while ((cred = *q) != NULL) {
375 - if (!cred->cr_count &&
376 + if (!atomic_read(&cred->cr_count) &&
377 time_before(cred->cr_expire, jiffies)) {
378 *q = cred->cr_next;
379 + cred->cr_auth = NULL;
380 cred->cr_next = free;
381 free = cred;
382 continue;
383 @@ -144,10 +164,7 @@
384 }
385 }
386 spin_unlock(&rpc_credcache_lock);
387 - while ((cred = free) != NULL) {
388 - free = cred->cr_next;
389 - rpcauth_crdestroy(auth, cred);
390 - }
391 + rpcauth_destroy_credlist(free);
392 auth->au_nextgc = jiffies + auth->au_expire;
393 }
394
395 @@ -163,8 +180,8 @@
396 spin_lock(&rpc_credcache_lock);
397 cred->cr_next = auth->au_credcache[nr];
398 auth->au_credcache[nr] = cred;
399 - cred->cr_count++;
400 - cred->cr_expire = jiffies + auth->au_expire;
401 + cred->cr_auth = auth;
402 + get_rpccred(cred);
403 spin_unlock(&rpc_credcache_lock);
404 }
405
406 @@ -187,7 +204,7 @@
407 q = &auth->au_credcache[nr];
408 while ((cred = *q) != NULL) {
409 if (!(cred->cr_flags & RPCAUTH_CRED_DEAD) &&
410 - auth->au_ops->crmatch(cred, taskflags)) {
411 + cred->cr_ops->crmatch(cred, taskflags)) {
412 *q = cred->cr_next;
413 break;
414 }
415 @@ -213,23 +230,23 @@
416 * Remove cred handle from cache
417 */
418 static void
419 -rpcauth_remove_credcache(struct rpc_auth *auth, struct rpc_cred *cred)
420 +rpcauth_remove_credcache(struct rpc_cred *cred)
421 {
422 + struct rpc_auth *auth = cred->cr_auth;
423 struct rpc_cred **q, *cr;
424 int nr;
425
426 nr = (cred->cr_uid & RPC_CREDCACHE_MASK);
427 - spin_lock(&rpc_credcache_lock);
428 q = &auth->au_credcache[nr];
429 while ((cr = *q) != NULL) {
430 if (cred == cr) {
431 *q = cred->cr_next;
432 cred->cr_next = NULL;
433 + cred->cr_auth = NULL;
434 break;
435 }
436 q = &cred->cr_next;
437 }
438 - spin_unlock(&rpc_credcache_lock);
439 }
440
441 struct rpc_cred *
442 @@ -258,7 +275,7 @@
443 {
444 dprintk("RPC: matching %s cred %d\n",
445 auth->au_ops->au_name, taskflags);
446 - return auth->au_ops->crmatch(cred, taskflags);
447 + return cred->cr_ops->crmatch(cred, taskflags);
448 }
449
450 void
451 @@ -266,26 +283,25 @@
452 {
453 dprintk("RPC: %4d holding %s cred %p\n",
454 task->tk_pid, task->tk_auth->au_ops->au_name, task->tk_msg.rpc_cred);
455 - if (task->tk_msg.rpc_cred) {
456 - spin_lock(&rpc_credcache_lock);
457 - task->tk_msg.rpc_cred->cr_count++;
458 - task->tk_msg.rpc_cred->cr_expire = jiffies + task->tk_auth->au_expire;
459 - spin_unlock(&rpc_credcache_lock);
460 - }
461 + if (task->tk_msg.rpc_cred)
462 + get_rpccred(task->tk_msg.rpc_cred);
463 }
464
465 void
466 -rpcauth_releasecred(struct rpc_auth *auth, struct rpc_cred *cred)
467 +put_rpccred(struct rpc_cred *cred)
468 {
469 - spin_lock(&rpc_credcache_lock);
470 - if (cred != NULL && cred->cr_count > 0) {
471 - if (!--cred->cr_count && (cred->cr_flags & RPCAUTH_CRED_DEAD)) {
472 - spin_unlock(&rpc_credcache_lock);
473 - rpcauth_remove_credcache(auth, cred);
474 - rpcauth_crdestroy(auth, cred);
475 - return;
476 - }
477 + if (!atomic_dec_and_lock(&cred->cr_count, &rpc_credcache_lock))
478 + return;
479 +
480 + if (cred->cr_auth && cred->cr_flags & RPCAUTH_CRED_DEAD)
481 + rpcauth_remove_credcache(cred);
482 +
483 + if (!cred->cr_auth) {
484 + spin_unlock(&rpc_credcache_lock);
485 + rpcauth_crdestroy(cred);
486 + return;
487 }
488 + cred->cr_expire = jiffies + cred->cr_auth->au_expire;
489 spin_unlock(&rpc_credcache_lock);
490 }
491
492 @@ -298,7 +314,7 @@
493 dprintk("RPC: %4d releasing %s cred %p\n",
494 task->tk_pid, auth->au_ops->au_name, cred);
495
496 - rpcauth_releasecred(auth, cred);
497 + put_rpccred(cred);
498 task->tk_msg.rpc_cred = NULL;
499 }
500
501 @@ -306,10 +322,11 @@
502 rpcauth_marshcred(struct rpc_task *task, u32 *p)
503 {
504 struct rpc_auth *auth = task->tk_auth;
505 + struct rpc_cred *cred = task->tk_msg.rpc_cred;
506
507 dprintk("RPC: %4d marshaling %s cred %p\n",
508 - task->tk_pid, auth->au_ops->au_name, task->tk_msg.rpc_cred);
509 - return auth->au_ops->crmarshal(task, p,
510 + task->tk_pid, auth->au_ops->au_name, cred);
511 + return cred->cr_ops->crmarshal(task, p,
512 task->tk_flags & RPC_CALL_REALUID);
513 }
514
515 @@ -317,20 +334,22 @@
516 rpcauth_checkverf(struct rpc_task *task, u32 *p)
517 {
518 struct rpc_auth *auth = task->tk_auth;
519 + struct rpc_cred *cred = task->tk_msg.rpc_cred;
520
521 dprintk("RPC: %4d validating %s cred %p\n",
522 - task->tk_pid, auth->au_ops->au_name, task->tk_msg.rpc_cred);
523 - return auth->au_ops->crvalidate(task, p);
524 + task->tk_pid, auth->au_ops->au_name, cred);
525 + return cred->cr_ops->crvalidate(task, p);
526 }
527
528 int
529 rpcauth_refreshcred(struct rpc_task *task)
530 {
531 struct rpc_auth *auth = task->tk_auth;
532 + struct rpc_cred *cred = task->tk_msg.rpc_cred;
533
534 dprintk("RPC: %4d refreshing %s cred %p\n",
535 - task->tk_pid, auth->au_ops->au_name, task->tk_msg.rpc_cred);
536 - task->tk_status = auth->au_ops->crrefresh(task);
537 + task->tk_pid, auth->au_ops->au_name, cred);
538 + task->tk_status = cred->cr_ops->crrefresh(task);
539 return task->tk_status;
540 }
541
542 diff -u --recursive --new-file linux-2.4.6-file/net/sunrpc/auth_null.c linux-2.4.6-mmap/net/sunrpc/auth_null.c
543 --- linux-2.4.6-file/net/sunrpc/auth_null.c Fri Feb 9 20:29:44 2001
544 +++ linux-2.4.6-mmap/net/sunrpc/auth_null.c Wed Jul 4 19:27:38 2001
545 @@ -17,6 +17,8 @@
546 # define RPCDBG_FACILITY RPCDBG_AUTH
547 #endif
548
549 +static struct rpc_credops null_credops;
550 +
551 static struct rpc_auth *
552 nul_create(struct rpc_clnt *clnt)
553 {
554 @@ -52,9 +54,10 @@
555
556 if (!(cred = (struct rpc_cred *) rpc_allocate(flags, sizeof(*cred))))
557 return NULL;
558 - cred->cr_count = 0;
559 + atomic_set(&cred->cr_count, 0);
560 cred->cr_flags = RPCAUTH_CRED_UPTODATE;
561 cred->cr_uid = current->uid;
562 + cred->cr_ops = &null_credops;
563
564 return cred;
565 }
566 @@ -124,7 +127,11 @@
567 #endif
568 nul_create,
569 nul_destroy,
570 - nul_create_cred,
571 + nul_create_cred
572 +};
573 +
574 +static
575 +struct rpc_credops null_credops = {
576 nul_destroy_cred,
577 nul_match,
578 nul_marshal,
579 diff -u --recursive --new-file linux-2.4.6-file/net/sunrpc/auth_unix.c linux-2.4.6-mmap/net/sunrpc/auth_unix.c
580 --- linux-2.4.6-file/net/sunrpc/auth_unix.c Fri Feb 9 20:29:44 2001
581 +++ linux-2.4.6-mmap/net/sunrpc/auth_unix.c Wed Jul 4 19:29:07 2001
582 @@ -33,6 +33,8 @@
583 # define RPCDBG_FACILITY RPCDBG_AUTH
584 #endif
585
586 +static struct rpc_credops unix_credops;
587 +
588 static struct rpc_auth *
589 unx_create(struct rpc_clnt *clnt)
590 {
591 @@ -71,7 +73,7 @@
592 if (!(cred = (struct unx_cred *) rpc_allocate(flags, sizeof(*cred))))
593 return NULL;
594
595 - cred->uc_count = 0;
596 + atomic_set(&cred->uc_count, 0);
597 cred->uc_flags = RPCAUTH_CRED_UPTODATE;
598 if (flags & RPC_TASK_ROOTCREDS) {
599 cred->uc_uid = cred->uc_fsuid = 0;
600 @@ -91,6 +93,7 @@
601 if (i < NFS_NGROUPS)
602 cred->uc_gids[i] = NOGROUP;
603 }
604 + cred->uc_base.cr_ops = &unix_credops;
605
606 return (struct rpc_cred *) cred;
607 }
608 @@ -106,7 +109,7 @@
609 if (!(cred = (struct unx_cred *) rpc_malloc(task, sizeof(*cred))))
610 return NULL;
611
612 - cred->uc_count = 1;
613 + atomic_set(&cred->uc_count, 1);
614 cred->uc_flags = RPCAUTH_CRED_DEAD|RPCAUTH_CRED_UPTODATE;
615 cred->uc_uid = uid;
616 cred->uc_gid = gid;
617 @@ -236,7 +239,11 @@
618 #endif
619 unx_create,
620 unx_destroy,
621 - unx_create_cred,
622 + unx_create_cred
623 +};
624 +
625 +static
626 +struct rpc_credops unix_credops = {
627 unx_destroy_cred,
628 unx_match,
629 unx_marshal,
630 diff -u --recursive --new-file linux-2.4.6-file/net/sunrpc/sunrpc_syms.c linux-2.4.6-mmap/net/sunrpc/sunrpc_syms.c
631 --- linux-2.4.6-file/net/sunrpc/sunrpc_syms.c Fri Jan 12 00:53:02 2001
632 +++ linux-2.4.6-mmap/net/sunrpc/sunrpc_syms.c Wed Jul 4 20:55:19 2001
633 @@ -65,7 +65,7 @@
634 EXPORT_SYMBOL(rpcauth_lookupcred);
635 EXPORT_SYMBOL(rpcauth_bindcred);
636 EXPORT_SYMBOL(rpcauth_matchcred);
637 -EXPORT_SYMBOL(rpcauth_releasecred);
638 +EXPORT_SYMBOL(put_rpccred);
639
640 /* RPC server stuff */
641 EXPORT_SYMBOL(svc_create);
642
643 _______________________________________________
644 NFS maillist - NFS@lists.sourceforge.net
645 http://lists.sourceforge.net/lists/listinfo/nfs
646
647

  ViewVC Help
Powered by ViewVC 1.1.20