summaryrefslogtreecommitdiffstats
path: root/fs
Commit message (Collapse)AuthorAgeFilesLines
* hfs: fix a potential buffer overflowAmerigo Wang2009-12-153-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | A specially-crafted Hierarchical File System (HFS) filesystem could cause a buffer overflow to occur in a process's kernel stack during a memcpy() call within the hfs_bnode_read() function (at fs/hfs/bnode.c:24). The attacker can provide the source buffer and length, and the destination buffer is a local variable of a fixed length. This local variable (passed as "&entry" from fs/hfs/dir.c:112 and allocated on line 60) is stored in the stack frame of hfs_bnode_read()'s caller, which is hfs_readdir(). Because the hfs_readdir() function executes upon any attempt to read a directory on the filesystem, it gets called whenever a user attempts to inspect any filesystem contents. [amwang@redhat.com: modify this patch and fix coding style problems] Signed-off-by: WANG Cong <amwang@redhat.com> Cc: Eugene Teo <eteo@redhat.com> Cc: Roman Zippel <zippel@linux-m68k.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: Christoph Hellwig <hch@lst.de> Cc: Alexey Dobriyan <adobriyan@gmail.com> Cc: Dave Anderson <anderson@redhat.com> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* Merge branch 'for_linus' of ↵Linus Torvalds2009-12-145-31/+66
|\ | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6 * 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-udf-2.6: udf: Avoid IO in udf_clear_inode udf: Try harder when looking for VAT inode udf: Fix compilation with UDFFS_DEBUG enabled
| * udf: Avoid IO in udf_clear_inodeJan Kara2009-12-143-22/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is not very good to do IO in udf_clear_inode. First, VFS does not really expect inode to become dirty there and thus we have to write it ourselves, second, memory reclaim gets blocked waiting for IO when it does not really expect it, third, the IO pattern (e.g. on umount) resulting from writes in udf_clear_inode is bad and it slows down writing a lot. The reason why UDF needed to do IO in udf_clear_inode is that UDF standard mandates extent length to exactly match inode size. But when we allocate extents to a file or directory, we don't really know what exactly the final file size will be and thus temporarily set it to block boundary and later truncate it to exact length in udf_clear_inode. Now, this is changed to truncate to final file size in udf_release_file for regular files. For directories and symlinks, we do the truncation at the moment when learn what the final file size will be. Signed-off-by: Jan Kara <jack@suse.cz>
| * udf: Try harder when looking for VAT inodeJan Kara2009-12-141-8/+24
| | | | | | | | | | | | | | | | Some disks do not contain VAT inode in the last recorded block as required by the standard but a few blocks earlier (or the number of recorded blocks is wrong). So look for the VAT inode a bit before the end of the media. Signed-off-by: Jan Kara <jack@suse.cz>
| * udf: Fix compilation with UDFFS_DEBUG enabledJan Kara2009-12-141-1/+1
| | | | | | | | Signed-off-by: Jan Kara <jack@suse.cz>
* | Merge branch 'for-linus' of git://neil.brown.name/mdLinus Torvalds2009-12-141-18/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'for-linus' of git://neil.brown.name/md: (27 commits) md: add 'recovery_start' per-device sysfs attribute md: rcu_read_lock() walk of mddev->disks in md_do_sync() md: integrate spares into array at earliest opportunity. md: move compat_ioctl handling into md.c md: revise Kconfig help for MD_MULTIPATH md: add MODULE_DESCRIPTION for all md related modules. raid: improve MD/raid10 handling of correctable read errors. md/raid10: print more useful messages on device failure. md/bitmap: update dirty flag when bitmap bits are explicitly set. md: Support write-intent bitmaps with externally managed metadata. md/bitmap: move setting of daemon_lastrun out of bitmap_read_sb md: support updating bitmap parameters via sysfs. md: factor out parsing of fixed-point numbers md: support bitmap offset appropriate for external-metadata arrays. md: remove needless setting of thread->timeout in raid10_quiesce md: change daemon_sleep to be in 'jiffies' rather than 'seconds'. md: move offset, daemon_sleep and chunksize out of bitmap structure md: collect bitmap-specific fields into one structure. md/raid1: add takeover support for raid5->raid1 md: add honouring of suspend_{lo,hi} to raid1. ...
| * | md: move compat_ioctl handling into md.cArnd Bergmann2009-12-141-18/+0
| |/ | | | | | | | | | | | | | | | | | | | | | | The RAID ioctls are only implemented in md.c, so the handling for them should also be moved there from fs/compat_ioctl.c. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Neil Brown <neilb@suse.de> Cc: Andre Noll <maan@systemlinux.org> Cc: linux-raid@vger.kernel.org Signed-off-by: NeilBrown <neilb@suse.de>
* | Merge git://git.linux-nfs.org/projects/trondmy/nfs-2.6Linus Torvalds2009-12-1418-408/+898
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.linux-nfs.org/projects/trondmy/nfs-2.6: (75 commits) NFS: Fix nfs_migrate_page() rpc: remove unneeded function parameter in gss_add_msg() nfs41: Invoke RECLAIM_COMPLETE on all new client ids SUNRPC: IS_ERR/PTR_ERR confusion NFSv41: Fix a potential state leakage when restarting nfs4_close_prepare nfs41: Handle NFSv4.1 session errors in the delegation recall code nfs41: Retry delegation return if it failed with session error nfs41: Handle session errors during delegation return nfs41: Mark stateids in need of reclaim if state manager gets stale clientid NFS: Fix up the declaration of nfs4_restart_rpc when NFSv4 not configured nfs41: Don't clear DRAINING flag on NFS4ERR_STALE_CLIENTID nfs41: nfs41_setup_state_renewal NFSv41: More cleanups NFSv41: Fix up some bugs in the NFS4CLNT_SESSION_DRAINING code NFSv41: Clean up slot table management NFSv41: Fix nfs4_proc_create_session nfs41: Invoke RECLAIM_COMPLETE nfs41: RECLAIM_COMPLETE functionality nfs41: RECLAIM_COMPLETE XDR functionality Cleanup some NFSv4 XDR decode comments ...
| * \ Merge branch 'nfs-for-2.6.33'Trond Myklebust2009-12-1318-408/+898
| |\ \ | | |/ | |/|
| | * NFS: Fix nfs_migrate_page()Trond Myklebust2009-12-101-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The call to migrate_page() will cause the page->private field to be cleared. Also fix up the locking around the page->private transfer, so that we ensure that calls to nfs_page_find_request() don't end up racing. Finally, fix up a double free bug: nfs_unlock_request() already calls nfs_release_request() for us... Reported-by: Wu Fengguang <fengguang.wu@intel.com> Tested-by: Andi Kleen <andi@firstfloor.org> Cc: stable@kernel.org Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Invoke RECLAIM_COMPLETE on all new client idsRicardo Labiaga2009-12-081-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The NFSv4.1 spec indicates RECLAIM_COMPLETE is to be issued whenever a client establishes a new client id, not only after detecting the server has rebooted. Set the NFS4CLNT_RECLAIM_REBOOT bit after every new client id has been established. This enables us to issue RECLAIM_COMPLETE during the wrap up of the NFS4CLNT_RECLAIM_REBOOT state. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: Fix a potential state leakage when restarting nfs4_close_prepareTrond Myklebust2009-12-081-17/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, if the call to nfs4_setup_sequence() in nfs4_close_prepare fails, any later retries will fail to launch an RPC call, due to the fact that the &state->flags will have been cleared. Ditto if nfs4_close_done() triggers a call to the NFSv4.1 version of nfs_restart_rpc(). We therefore move the actual clearing of the state->flags to nfs4_close_done(), when we know that the RPC call was successful. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Handle NFSv4.1 session errors in the delegation recall codeRicardo Labiaga2009-12-071-0/+5
| | | | | | | | | | | | | | | Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Retry delegation return if it failed with session errorRicardo Labiaga2009-12-071-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | Update nfs4_delegreturn_done() to retry the operation after setting the NFS4CLNT_SESSION_SETUP bit to indicate the need to reset the session. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Handle session errors during delegation returnRicardo Labiaga2009-12-071-0/+8
| | | | | | | | | | | | | | | | | | | | | Add session error handling to nfs4_open_delegation_recall() Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Mark stateids in need of reclaim if state manager gets stale clientidRicardo Labiaga2009-12-071-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | The state manager was not marking the stateids as needing to be reclaimed after reestablishing the clientid. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFS: Fix up the declaration of nfs4_restart_rpc when NFSv4 not configuredTrond Myklebust2009-12-075-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | Also rename it: it is used in generic code, and so should not have a 'nfs4' prefix. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Don't clear DRAINING flag on NFS4ERR_STALE_CLIENTIDRicardo Labiaga2009-12-062-18/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If CREATE_SESSION fails with NFS4ERR_STALE_CLIENTID, don't clear the NFS4CLNT_SESSION_DRAINING flag and don't wake RPCs waiting for the session to be reestablished. We don't have a session yet, so there is no reason to wake other RPCs. This avoids sending spurious compounds with bogus sequenceID during session and state recovery. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> [Trond.Myklebust@netapp.com: cleaned up patch by adding the nfs41_begin/end_drain_session() helpers] Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: nfs41_setup_state_renewalRicardo Labiaga2009-12-063-18/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move call to get the lease time and the setup of the state renewal out of nfs4_create_session so that it can be called after clearing the DRAINING flag. We use the getattr RPC to obtain the lease time, which requires a sequence slot. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: More cleanupsTrond Myklebust2009-12-051-4/+3
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: Fix up some bugs in the NFS4CLNT_SESSION_DRAINING codeTrond Myklebust2009-12-052-11/+10
| | | | | | | | | | | | Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: Clean up slot table managementTrond Myklebust2009-12-055-82/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | We no longer need to maintain a distinction between nfs41_sequence_done and nfs41_sequence_free_slot. This fixes a number of slot table leakages in the NFSv4.1 code. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: Fix nfs4_proc_create_sessionTrond Myklebust2009-12-053-39/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We should not assume that nfs41_init_clientid() will always want to initialise the session. If it is being called due to a server reboot, then we just want to reset the session after re-establishing the clientid. Fix this by getting rid of the 'reset' parameter in nfs4_proc_create_session(), and instead relying on whether or not the session slot table pointer is non-NULL. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: Invoke RECLAIM_COMPLETERicardo Labiaga2009-12-051-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch invokes RECLAIM_COMPLETE after the client is done reclaiming state. There are interpretations of the spec that suggest that RECLAIM_COMPLETE should also be issued after a new clientid has been obtained from the server and even if there is no state to reclaim. This tells the server that the client has no state to reclaim even if the client isn't aware the server may have rebooted. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: RECLAIM_COMPLETE functionalityRicardo Labiaga2009-12-053-0/+114
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implements RECLAIM_COMPLETE as an asynchronous RPC. NFS4ERR_DELAY is retried, NFS4ERR_DEADSESSION invokes the error handling but does not result in a retry, since we don't want to have a lingering RECLAIM_COMPLETE call sent in the middle of a possible new state recovery cycle. If a session reset occurs, a new wave of reclaim operations will follow, containing their own RECLAIM_COMPLETE call. We don't want a retry to get on the way of recovery by incorrectly indicating to the server that we're done reclaiming state. A subsequent patch invokes the functionality. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: RECLAIM_COMPLETE XDR functionalityRicardo Labiaga2009-12-051-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | XDR encoding and decoding for RECLAIM_COMPLETE. Implements the necessary encoding to indicate reclaim complete for the entire client. In the future, it can be extended to provide reclaim complete functionality for a single file system after migration. Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * Cleanup some NFSv4 XDR decode commentsRicardo Labiaga2009-12-051-13/+13
| | | | | | | | | | | | | | | Signed-off-by: Ricardo Labiaga <Ricardo.Labiaga@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * NFSv41: nfs4_reset_session must always set NFS4CLNT_SESSION_DRAININGTrond Myklebust2009-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | Otherwise we have no guarantees that other processes won't start another RPC call while we're resetting the session. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: v2 fix cb_recall bugAlexandros Batsakis2009-12-054-7/+48
| | | | | | | | | | | | | | | | | | | | | in NFSv4.1 the seqid part of a stateid in CB_RECALL must be 0 Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: check SEQUENCE status flagAlexandros Batsakis2009-12-054-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the server can indicate a number of error conditions by setting the appropriate bits in the SEQUENCE operation. The client re-establishes state with the server when it receives one of those, with the action depending on the specific case. Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: V2 adjust max_rqst_sz, max_resp_sz w.r.t to rsize, wsizeAlexandros Batsakis2009-12-054-4/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | The v4.1 client should take into account the desired rsize, wsize when negotiating the max size in CREATE_SESSION. Accordingly, it should use rsize, wsize that are smaller than the session negotiated values. Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: remove server-only EXCHGID4_FLAG_CONFIRMED_R flag from exchange_idAlexandros Batsakis2009-12-051-0/+3
| | | | | | | | | | | | | | | Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: add support for the exclusive create flagsAlexandros Batsakis2009-12-052-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In v4.1 the client MUST/SHOULD use the EXCLUSIVE4_1 flag instead of EXCLUSIVE4, and GUARDED when the server supports persistent sessions. For now (and until we support suppattr_exclcreat), we don't send any attributes with EXCLUSIVE4_1 relying in the subsequent SETATTR as in v4.0 Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: check if session exists and if it is persistentAlexandros Batsakis2009-12-051-0/+9
| | | | | | | | | | | | | | | Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: V2 initial support for CB_RECALL_ANYAlexandros Batsakis2009-12-055-2/+68
| | | | | | | | | | | | | | | | | | | | | | | | For now the clients returns _all_ the delegations of the specificed type it holds Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs4: V2 return/expire delegations depending on their typeAlexandros Batsakis2009-12-051-4/+18
| | | | | | | | | | | | | | | Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs4: minor delegation cleaningAlexandros Batsakis2009-12-051-4/+2
| | | | | | | | | | | | | | | Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: add support for callback with RPC version number 4Alexandros Batsakis2009-12-054-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | The NFSv4.1 spec-29 (18.36.3) says that the server MUST use an ONC RPC (program) version number equal to 4 in callbacks sent to the client. For now we allow both versions 1 and 4. Signed-off-by: Alexandros Batsakis <batsakis@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: only state manager sets NFS4CLNT_SESSION_SETUPAndy Adamson2009-12-042-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | Replace sync and async handlers setting of the NFS4CLNT_SESSION_SETUP bit with setting NFS4CLNT_CHECK_LEASE, and let the state manager decide to reset the session. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: drain session cleanupAndy Adamson2009-12-041-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Do not wake up the next slot_tbl_waitq task in nfs4_free_slot because we may be draining the slot. Either signal the state manager that the session is drained (the state manager wakes up tasks) OR wake up the next task. In nfs41_sequence_done, the slot dereference is only needed in the sequence operation success case. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: nfs41: fix state manager deadlock in session resetAndy Adamson2009-12-043-9/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the session is reset during state recovery, the state manager thread can sleep on the slot_tbl_waitq causing a deadlock. Add a completion framework to the session. Have the state manager thread set a new session state (NFS4CLNT_SESSION_DRAINING) and wait for the session slot table to drain. Signal the state manager thread in nfs41_sequence_free_slot when the NFS4CLNT_SESSION_DRAINING bit is set and the session is drained. Reported-by: Trond Myklebust <trond@netapp.com> Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: remove nfs4_recover_sessionAndy Adamson2009-12-041-23/+3
| | | | | | | | | | | | | | | | | | | | | | | | nfs4_recover_session can put rpciod to sleep. Just use nfs4_schedule_recovery. Reported-by: Trond Myklebust <trond.myklebust@netapp.com> Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: don't clear tk_action on successAndy Adamson2009-12-041-1/+1
| | | | | | | | | | | | | | | Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: fix switch in nfs4_recovery_handle_errorAndy Adamson2009-12-041-0/+1
| | | | | | | | | | | | | | | | | | | | | Do not fall through and set NFS4CLNT_SESSION_RESET bit on NFS4ERR_EXPIRED Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: fix switch in nfs4_handle_exceptionAndy Adamson2009-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | Do not fall through and call nfs4_delay on session error handling. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: free the slot on unhandled read errorsAndy Adamson2009-12-041-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | nfs4_read_done returns zero on unhandled errors. nfs_readpage_result will return on a negative tk_status without freeing the slot. Call nfs4_sequence_free_slot on unhandled errors in nfs4_read_done. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: call free slot from nfs4_restart_rpcAndy Adamson2009-12-045-23/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | nfs41_sequence_free_slot can be called multiple times on SEQUENCE operation errors. No reason to inline nfs4_restart_rpc Reported-by: Trond Myklebust <trond.myklebust@netapp.com> nfs_writeback_done and nfs_readpage_retry call nfs4_restart_rpc outside the error handler, and the slot is not freed prior to restarting in the rpc_prepare state during session reset. Fix this by moving the call to nfs41_sequence_free_slot from the error path of nfs41_sequence_done into nfs4_restart_rpc, and by removing the test for NFS4CLNT_SESSION_SETUP. Always free slot and goto the rpc prepare state on async errors. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: nfs4_get_lease_time will never session resetAndy Adamson2009-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Make this clear by calling rpc_restart-call. Prepare for nfs4_restart_rpc() to free slots. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: rename cl_state session SETUP bit to RESETAndy Adamson2009-12-044-10/+10
| | | | | | | | | | | | | | | | | | | | | The bit is no longer used for session setup, only for session reset. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
| | * nfs41: add create session into establish_clidAndy Adamson2009-12-043-25/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported-by: Trond Myklebust <trond.myklebust@netapp.com> Resetting the clientid from the state manager could result in not confirming the clientid due to create session not being called. Move the create session call from the NFS4CLNT_SESSION_SETUP state manager initialize session case into the NFS4CLNT_LEASE_EXPIRED case establish_clid call. Signed-off-by: Andy Adamson <andros@netapp.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
OpenPOWER on IntegriCloud