summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* lockd: fix reference count leaks in async locking caseOleg Drokin2008-02-012-17/+25
| | | | | | | | | | | | In a number of places where we wish only to translate nlm_drop_reply to rpc_drop_reply errors we instead return early with rpc_drop_reply, skipping some important end-of-function cleanup. This results in reference count leaks when lockd is doing posix locking on GFS2. Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: recognize callback channel failure earlierJ. Bruce Fields2008-02-012-9/+9
| | | | | | | | | | | | | | | | | | | | | | When the callback channel fails, we inform the client of that by returning a cb_path_down error the next time it tries to renew its lease. If we wait most of a lease period before deciding that a callback has failed and that the callback channel is down, then we decrease the chances that the client will find out in time to do anything about it. So, mark the channel down as soon as we recognize that an rpc has failed. However, continue trying to recall delegations anyway, in hopes it will come back up. This will prevent more delegations from being given out, and ensure cb_path_down is returned to renew calls earlier, while still making the best effort to deliver recalls of existing delegations. Also fix a couple comments and remove a dprink that doesn't seem likely to be useful. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: miscellaneous nfs4state.c style fixesJ. Bruce Fields2008-02-011-29/+26
| | | | | | Fix various minor style violations. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: make current_clientid localJ. Bruce Fields2008-02-011-3/+4
| | | | | | | Declare this variable in the one function where it's used, and clean up some minor style problems. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: fix encode_entryplus_baggage() indentationJ. Bruce Fields2008-02-011-5/+5
| | | | | | Fix bizarre indentation. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: kill unneeded cl_confirm checkJ. Bruce Fields2008-02-011-3/+1
| | | | | | | | | We generate a unique cl_confirm for every new client; so if we've already checked that this cl_confirm agrees with the cl_confirm of unconf, then we already know that it does not agree with the cl_confirm of conf. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: remove unnecessary cl_verifier check from setclientid_confirmJ. Bruce Fields2008-02-011-4/+1
| | | | | | | | Again, the only way conf and unconf can have the same clientid is if they were created in the "probable callback update" case of setclientid, in which case we already know that the cl_verifier fields must agree. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: kill unnecessary same_name() in setclientid_confirmJ. Bruce Fields2008-02-011-3/+1
| | | | | | | | | | | | | | | | If conf and unconf are both found in the lookup by cl_clientid, then they share the same cl_clientid. We always create a unique new cl_clientid field when creating a new client--the only exception is the "probable callback update" case in setclientid, where we copy the old cl_clientid from another clientid with the same name. Therefore two clients with the same cl_client field also always share the same cl_name field, and a couple of the checks here are redundant. Thanks to Simon Holm Thøgersen for a compile fix. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu> Cc: Simon Holm Thøgersen <odie@cs.aau.dk>
* nfsd: uniquify cl_confirm valuesJ. Bruce Fields2008-02-011-7/+6
| | | | | | | Using a counter instead of the nanoseconds value seems more likely to produce a unique cl_confirm. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: eliminate final bogus case from setclientid logicJ. Bruce Fields2008-02-011-6/+1
| | | | | | | We're supposed to generate a different cl_confirm verifier for each new client, so these to cl_confirm values should never be the same. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: kill some unneeded setclientid commentsJ. Bruce Fields2008-02-011-96/+40
| | | | | | | | | | Most of these comments just summarize the code. The matching of code to the cases described in the RFC may still be useful, though; add specific section references to make that easier to follow. Also update references to the outdated RFC 3010. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: minor fs/nfsd/auth.h cleanupJ. Bruce Fields2008-02-011-5/+0
| | | | | | | | While we're here, let's remove the redundant (and now wrong) pathname in the comment, and the #ifdef __KERNEL__'s. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: move nfsd/auth.h into fs/nfsdJ. Bruce Fields2008-02-017-3/+3
| | | | | | | | | | This header is used only in a few places in fs/nfsd, so there seems to be little point to having it in include/. (Thanks to Robert Day for pointing this out.) Cc: Robert P. J. Day <rpjday@crashcourse.ca> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* knfsd: allow cache_register to return error on failureJ. Bruce Fields2008-02-018-25/+74
| | | | | | | | | | | | | Newer server features such as nfsv4 and gss depend on proc to work, so a failure to initialize the proc files they need should be treated as fatal. Thanks to Andrew Morton for style fix and compile fix in case where CONFIG_NFSD_V4 is undefined. Cc: Andrew Morton <akpm@linux-foundation.org> Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: move cache proc (un)registration to separate functionJ. Bruce Fields2008-02-011-45/+54
| | | | | | | | | | Just some minor cleanup. Also I don't see much point in trying to register further proc entries if initial entries fail; so just stop trying in that case. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: fail init on /proc/fs/nfs/exports creation failureJ. Bruce Fields2008-02-011-9/+28
| | | | | | | | | | | I assume the reason failure of creation was ignored here was just to continue support embedded systems that want nfsd but not proc. However, in cases where proc is supported it would be clearer to fail entirely than to come up with some features disabled. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: select CONFIG_PROC_FS in nfsv4 and gss server casesJ. Bruce Fields2008-02-011-0/+2
| | | | | | | The server depends on upcalls under /proc to support nfsv4 and gss. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* knfsd: cache unregistration needn't return errorJ. Bruce Fields2008-02-016-20/+14
| | | | | | | | | | There's really nothing much the caller can do if cache unregistration fails. And indeed, all any caller does in this case is print an error and continue. So just return void and move the printk's inside cache_unregister. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: fail module init on reply cache init failureJ. Bruce Fields2008-02-013-22/+21
| | | | | | | | | | | | | | | | | | If the reply cache initialization fails due to a kmalloc failure, currently we try to soldier on with a reduced (or nonexistant) reply cache. Better to just fail immediately: the failure is then much easier to understand and debug, and it could save us complexity in some later code. (But actually, it doesn't help currently because the cache is also turned off in some odd failure cases; we should probably find a better way to handle those failure cases some day.) Fix some minor style problems while we're at it, and rename nfsd_cache_init() to remove the need for a comment describing it. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: cleanup nfsd module initialization cleanupJ. Bruce Fields2008-02-011-10/+12
| | | | | | | | | | | Handle the failure case here with something closer to the standard kernel style. Doesn't really matter for now, but I'd like to add a few more failure cases, and then this'll help. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* knfsd: cleanup nfsd4 properly on module init failureJ. Bruce Fields2008-02-011-0/+2
| | | | | | | We forgot to shut down the nfs4 state and idmapping code in this case. Acked-by: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: Fix handling of negative lengths in read_buf()J. Bruce Fields2008-02-011-2/+7
| | | | | | | | | | | | The length "nbytes" passed into read_buf should never be negative, but we check only for too-large values of "nbytes", not for too-small values. Make nbytes unsigned, so it's clear that the former tests are sufficient. (Despite this read_buf() currently correctly returns an xdr error in the case of a negative length, thanks to an unsigned comparison with size_of() and bounds-checking in kmalloc(). This seems very fragile, though.) Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* knfsd: fix cache.c commentJ. Bruce Fields2008-02-011-5/+5
| | | | | | | The path here must be left over from some earlier draft; fix it. And do some more minor cleanup while we're there. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: Path name length signage in nfsd request argument structuresChuck Lever2008-02-012-2/+2
| | | | | | | | | Clean up: For consistency, store the length of path name strings in nfsd argument structures as unsigned integers. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: Fix mixed sign comparison in nfs3svc_decode_symlinkargsChuck Lever2008-02-011-3/+3
| | | | | | Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: Use unsigned length argument for decode_pathnameChuck Lever2008-02-011-2/+2
| | | | | | | | | Clean up: path name lengths are unsigned on the wire, negative lengths are not meaningful natively either. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: Adjust filename length argument of nfsd_lookupChuck Lever2008-02-012-4/+4
| | | | | | | | | | Clean up: adjust the sign of the length argument of nfsd_lookup and nfsd_lookup_dentry, for consistency with recent changes. NFSD version 4 callers already pass an unsigned file name length. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: File name length signage in nfsd request argument structuresChuck Lever2008-02-012-13/+13
| | | | | | | | | | Clean up: For consistency, store the length of file name strings in nfsd argument structures as unsigned integers. This matches the XDR routines and client argument structures for the same operation types. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NFSD: Use unsigned length argument for decode_filenameChuck Lever2008-02-012-4/+4
| | | | | | | | | Clean up: file name lengths are unsigned on the wire, negative lengths are not meaningful natively either. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* NLM: Fix sign of length of NLM variable length stringsChuck Lever2008-02-013-13/+19
| | | | | | | | | | | | | | | According to The Open Group's NLM specification, NLM callers are variable length strings. XDR variable length strings use an unsigned 32 bit length. And internally, negative string lengths are not meaningful for the Linux NLM implementation. Clean up: Make nlm_lock.len and nlm_reboot.len unsigned integers. This makes the sign of NLM string lengths consistent with the sign of xdr_netobj lengths. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* SUNRPC: Use unsigned string lengths in xdr_decode_string_inplaceChuck Lever2008-02-012-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | XDR strings, opaques, and net objects should all use unsigned lengths. To wit, RFC 4506 says: 4.2. Unsigned Integer An XDR unsigned integer is a 32-bit datum that encodes a non-negative integer in the range [0,4294967295]. ... 4.11. String The standard defines a string of n (numbered 0 through n-1) ASCII bytes to be the number n encoded as an unsigned integer (as described above), and followed by the n bytes of the string. After this patch, xdr_decode_string_inplace now matches the other XDR string and array helpers that take a string length argument. See: xdr_encode_opaque_fixed, xdr_encode_opaque, xdr_encode_array Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-By: NeilBrown <neilb@suse.de> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* SUNRPC: Prevent length underflow in read_flush()Chuck Lever2008-02-011-5/+5
| | | | | | | | Make sure we compare an unsigned length to an unsigned count in read_flush(). Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* knfsd: fix broken length check in nfs4idmap.cJ. Bruce Fields2008-02-011-6/+3
| | | | | | | | | | | | Obviously at some point we thought "error" represented the length when positive. This appears to be a long-standing typo. Thanks to Prasad Potluri <pvp@us.ibm.com> for finding the problem and proposing an earlier version of this patch. Cc: Steve French <smfltc@us.ibm.com> Cc: Prasad V Potluri <pvp@us.ibm.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: Fix inconsistent assignmentPrasad P2008-02-011-1/+6
| | | | | | | | | | | | | | Dereferenced pointer "dentry" without checking and assigned to inode in the declaration. (We could just delete the NULL checks that follow instead, as we never get to the encode function in this particular case. But it takes a little detective work to verify that fact, so it's probably safer to leave the checks in place.) Cc: Steve French <smfltc@us.ibm.com> Signed-off-by: Prasad V Potluri <pvp@us.ibm.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd: move callback rpc_client creation into separate threadJ. Bruce Fields2008-02-011-39/+39
| | | | | | | | | The whole reason to move this callback-channel probe into a separate thread was because (for now) we don't have an easy way to create the rpc_client asynchronously. But I forgot to move the rpc_create() to the spawned thread. Doh! Fix that. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* nfsd4: probe callback channel only onceJ. Bruce Fields2008-02-012-4/+2
| | | | | | | | | | | Our callback code doesn't actually handle concurrent attempts to probe the callback channel. Some rethinking of the locking may be required. However, we can also just move the callback probing to this case. Since this is the only time a client is "confirmed" (and since that can only happen once in the lifetime of a client), this ensures we only probe once. Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
* Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-blockLinus Torvalds2008-02-0117-254/+220
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://git.kernel.dk/linux-2.6-block: block: kill swap_io_context() as-iosched: fix inconsistent ioc->lock context ide-cd: fix leftover data BUG block: make elevator lib checkpatch compliant cfq-iosched: make checkpatch compliant block: make core bits checkpatch compliant block: new end request handling interface should take unsigned byte counts unexport add_disk_randomness block/sunvdc.c:print_version() must be __devinit splice: always updated atime in direct splice
| * block: kill swap_io_context()Jens Axboe2008-02-013-24/+0
| | | | | | | | | | | | | | | | | | | | It blindly copies everything in the io_context, including the lock. That doesn't work so well for either lock ordering or lockdep. There seems zero point in swapping io contexts on a request to request merge, so the best point of action is to just remove it. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * as-iosched: fix inconsistent ioc->lock contextJens Axboe2008-02-011-4/+6
| | | | | | | | | | | | | | | | | | | | | | Since it's acquired from irq context, all locking must be of the irq safe variant. Most are already inside the queue lock (which already disables interrupts), but the io scheduler rmmod path always has irqs enabled and the put_io_context() path may legally be called with irqs enabled (even if it isn't usually). So fixup those two. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * ide-cd: fix leftover data BUGJens Axboe2008-02-011-1/+1
| | | | | | | | | | | | | | | | It's perfectly legal to have data leftovers when a drive signals completion, it happens all the time when a user issues a command with a transfer count that is too large. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * block: make elevator lib checkpatch compliantJens Axboe2008-02-011-27/+30
| | | | | | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * cfq-iosched: make checkpatch compliantJens Axboe2008-02-011-37/+46
| | | | | | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * block: make core bits checkpatch compliantJens Axboe2008-02-018-142/+117
| | | | | | | | Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * block: new end request handling interface should take unsigned byte countsJens Axboe2008-02-012-13/+18
| | | | | | | | | | | | | | No point in passing signed integers as the byte count, they can never be negative. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * unexport add_disk_randomnessAdrian Bunk2008-02-011-2/+0
| | | | | | | | | | | | | | | | This patch removes the no longer used EXPORT_SYMBOL(add_disk_randomness). Signed-off-by: Adrian Bunk <bunk@kernel.org> Acked-by: Matt Mackall <mpm@selenic.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * block/sunvdc.c:print_version() must be __devinitAdrian Bunk2008-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch fixes the following section mismatches: <-- snip --> ... WARNING: drivers/block/sunvdc.o(.text+0xf0): Section mismatch in reference from the function print_version() to the variable .devinit.data:version WARNING: drivers/block/sunvdc.o(.text+0xf8): Section mismatch in reference from the function print_version() to the variable .devinit.data:version ... <-- snip --> Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
| * splice: always updated atime in direct spliceJens Axboe2008-02-011-3/+1
| | | | | | | | | | | | | | | | | | | | Andre Majorel <aym-xunil@teaser.fr> points out that if we only updated the atime when we transfer some data, we deviate from the standard of always updating the atime. So change splice to always call file_accessed() even if splice_direct_to_actor() didn't transfer any data. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
* | docbook: rapidio: fix fatal filename errorRandy Dunlap2008-02-011-3/+3
| | | | | | | | | | | | | | | | Fix docbook fatal error (files were renamed): docproc: linux-2.6.24-git9/arch/ppc/kernel/rio.c: No such file or directory Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | fix directory entry in arch-x86-MakefileSteven Rostedt2008-02-011-1/+1
| | | | | | | | | | | | | | | | | | | | Doing a make randconfig I came across this error in the Makefile. This patch makes a directory out of arch/x86/mach-default for CONFIG_X86_RDC321X Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* | Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6Linus Torvalds2008-02-014-4/+4
|\ \ | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: [SPARC64]: Fix inconsistent .section usage in lib/ [SPARC/SPARC64]: Fix usage of .section .sched.text in assembler code.
OpenPOWER on IntegriCloud