Introduction
Subsystems (3)
PATCH 1/1 Introduction
9 patches for knfsd in 2.6.9-rc1-mm2
The first three affect all versions. The remaining are v4 specific.
1 - Add O_NONBLOCK to calls to break_lease so the nfs server doesn't block
pointlessly. Return nfserr_jukebox for v3, or just drop the reques for v2 if we get a EWOULDBLOCK.
2 - Change a return of "ESTALE" or "EACCES" in a situation where ACCES is
argueable the more correct error, and real people have had real problems that were really fixed.
3 - Fix some indentation.
4 - Check is filesystem supports acls before returning "acl supported" attribute
5-9 assorted v4 locking changes.
NeilBrown
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 Calls to break_lease in nfsd should be O_NONBLOCKing.
If we would block, we return "err-jukebox" for nfsv3, or just drop the request for v2.
### Diffstat output
./fs/nfsd/nfsproc.c | 1 + ./fs/nfsd/nfssvc.c | 2 ++ ./fs/nfsd/vfs.c | 8 ++++---- 3 files changed, 7 insertions(+), 4 deletions(-)
fs/nfsd/nfsproc.c renamed from fs/nfsd/nfsproc.c~current~ +1 -0
@@ -586,6 +586,7 @@ nfserrno (int errno) { nfserr_dquot, -EDQUOT }, #endif { nfserr_stale, -ESTALE }, + { nfserr_jukebox, -EWOULDBLOCK }, { nfserr_jukebox, -ETIMEDOUT }, { nfserr_dropit, -EAGAIN }, { nfserr_dropit, -ENOMEM },
fs/nfsd/nfssvc.c renamed from fs/nfsd/nfssvc.c~current~ +2 -0
@@ -328,6 +328,8 @@ nfsd_dispatch(struct svc_rqst *rqstp, u3/* Now call the procedure handler, and encode NFS status. */ nfserr = proc->pc_func (rqstp, rqstp->rq_argp, rqstp->rq_resp); +if (nfserr == nfserr_jukebox && rqstp->rq_vers ==2 ) + nfserr = nfserr_dropit;if (nfserr == nfserr_dropit) {dprintk ("nfsd: Dropping request due to malloc failure!\n" );nfsd_cache_update (rqstp,RC_NOCACHE ,NULL );
fs/nfsd/vfs.c renamed from fs/nfsd/vfs.c~current~ +4 -4
@@ -303,8 +303,8 @@ nfsd_setattr(struct svc_rqst *rqstp, str* If we are changing the size of the file, then * we need to break all leases. */ - err =break_lease (inode,FMODE_WRITE ); -if (err) + err =break_lease (inode,FMODE_WRITE |O_NONBLOCK ); +if (err)/* ENOMEM or EWOULDBLOCK */ goto out_nfserr; err =get_write_access (inode);
@@ -669,8 +669,8 @@ nfsd_open(struct svc_rqst *rqstp, struct* Check to see if there are any leases on this file. * This may block while leases are broken. */ - err =break_lease (inode, (access &MAY_WRITE ) ?FMODE_WRITE :0 ); -if (err) + err =break_lease (inode,O_NONBLOCK | ((access &MAY_WRITE ) ?FMODE_WRITE :0 )); +if (err)/* NOMEM or WOULDBLOCK */ goto out_nfserr;if (access &MAY_WRITE ) {
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
Re: [PATCH kNFSd 1 of 9] Calls to break_lease in nfsd should be O_NONBLOCKing.
Quoted 3 lines · NeilBrown
If we would block, we return "err-jukebox" for nfsv3, or just drop the request for v2.
Sorry, only just noticed there's a problem here:
fs/nfsd/nfsproc.c nfserrno (int errno) · line 592
Quoted 11 lines
diff
./fs/nfsd/nfsproc.c~current~./fs/nfsd/nfsproc.cfs/nfsd/nfsproc.c renamed from fs/nfsd/nfsproc.c~current~ +1
-0@@ -586,6 +586,7 @@ nfserrno (int errno) { nfserr_dquot, -EDQUOT }, #endif { nfserr_stale, -ESTALE }, + { nfserr_jukebox, -EWOULDBLOCK }, { nfserr_jukebox, -ETIMEDOUT }, { nfserr_dropit, -EAGAIN }, { nfserr_dropit, -ENOMEM },
Note that EWOULDBLOCK is defined to be EAGAIN in include/asm-generic/errno.h, so the effect of this is to map EAGAIN to nfserr_jukebox instead of nfserr_dropit.
The cache upcall deferral code depends on EAGAIN being mapped to nfserr_dropit. So now whenever cache upcall deferral happens, the client gets a nfserr_jukebox response, which isn't what we want.
--b.
-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal Use IT products in your business? Tell us what you think of them. Give us Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 Return EACCES instead of ESTALE for certain filehandle lookup failures
In reply to NeilBrownAs 'nfs_acceptable' uses the authnetication user in it's checks, the filehandle might not be truely "stale" - EACCES is safer.
Thanks Olaf Kirch <[email protected]> and others.
### Diffstat output
./fs/exportfs/expfs.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-)
fs/exportfs/expfs.c renamed from fs/exportfs/expfs.c~current~ +6 -1
@@ -283,7 +283,12 @@ find_exported_dentry(struct super_block/* drat - I just cannot find anything acceptable */ dput (result); -return ERR_PTR (-ESTALE ); +/* It might be justifiable to return ESTALE here, +* but the filehandle at-least looks reasonable good +* and it just be a permission problem, so returning +* -EACCESS is safer +*/ +return ERR_PTR (-EACCES ); err_target:dput (target_dir);
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 nfsd4: Support acl_support attribute
In reply to NeilBrownThe nfs4 attributes supported_attrs and aclsupport should not be static; they need to depend on the exported filesystem's acl support. Test the latter by attempting to get an acl, and adjust the returned attributes apropriately.
### Diffstat output
./fs/nfsd/nfs4xdr.c | 25 +++++++++++++++---------- 1 files changed, 15 insertions(+), 10 deletions(-)
fs/nfsd/nfs4xdr.c renamed from fs/nfsd/nfs4xdr.c~current~ +15 -10
@@ -1414,6 +1414,7 @@ nfsd4_encode_fattr(struct svc_fh *fhp, su64 dummy64;u32 *p = buffer;int status; +int aclsupport =0 ;struct nfs4_acl *acl =NULL ;BUG_ON (bmval1 &NFSD_WRITEONLY_ATTRS_WORD1 );
@@ -1437,12 +1438,16 @@ nfsd4_encode_fattr(struct svc_fh *fhp, s goto out; fhp = &tempfh; } -if (bmval0 &FATTR4_WORD0_ACL ) { +if (bmval0 & (FATTR4_WORD0_ACL |FATTR4_WORD0_ACLSUPPORT + |FATTR4_WORD0_SUPPORTED_ATTRS )) { status =nfsd4_get_nfs4_acl (rqstp, dentry, &acl); -if (status == -EOPNOTSUPP ) - bmval0 &= ~FATTR4_WORD0_ACL ; -else if (status <0 ) - goto out_nfserr; + aclsupport = (status ==0 ); +if (bmval0 &FATTR4_WORD0_ACL ) { +if (status == -EOPNOTSUPP ) + bmval0 &= ~FATTR4_WORD0_ACL ; +else if (status !=0 ) + goto out_nfserr; + } }if ((buflen -=16 ) <0 ) goto out_resource;
@@ -1456,9 +1461,9 @@ nfsd4_encode_fattr(struct svc_fh *fhp, sif ((buflen -=12 ) <0 ) goto out_resource;WRITE32 (2 ); -/* XXX Should depend on exported filesystem (e.g. -* for acl support) */ -WRITE32 (NFSD_SUPPORTED_ATTRS_WORD0 ); +WRITE32 (aclsupport ? +NFSD_SUPPORTED_ATTRS_WORD0 : +NFSD_SUPPORTED_ATTRS_WORD0 & ~FATTR4_WORD0_ACL );WRITE32 (NFSD_SUPPORTED_ATTRS_WORD1 ); }if (bmval0 &FATTR4_WORD0_TYPE ) {
@@ -1565,8 +1570,8 @@ out_acl:if (bmval0 &FATTR4_WORD0_ACLSUPPORT ) {if ((buflen -=4 ) <0 ) goto out_resource; -/* XXX: should depend on exported filesystem: */ -WRITE32 (ACL4_SUPPORT_ALLOW_ACL |ACL4_SUPPORT_DENY_ACL ); +WRITE32 (aclsupport ? +ACL4_SUPPORT_ALLOW_ACL |ACL4_SUPPORT_DENY_ACL :0 ); }if (bmval0 &FATTR4_WORD0_CANSETTIME ) {if ((buflen -=4 ) <0 )
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 nfsd4 could leak a stateid in an error path
In reply to NeilBrownnfsd4 could leak a stateid in a case of kmalloc failure; fix.
### Diffstat output
./fs/nfsd/nfs4state.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-)
fs/nfsd/nfs4state.c renamed from fs/nfsd/nfs4state.c~current~ +3 -1
@@ -2153,8 +2153,10 @@ nfsd4_lock(struct svc_rqst *rqstp, strucif (!(lock->lk_stateowner =alloc_init_lock_stateowner (strhashval, open_sop->so_client, open_stp, lock))) goto out;if ((lock_stp =alloc_init_lock_stateid (lock->lk_stateowner, - fp, open_stp)) ==NULL ) + fp, open_stp)) ==NULL ) { +release_stateowner (lock->lk_stateowner); goto out; + }/* bump the open seqid used to create the lock */ open_sop->so_seqid++; }else {
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 nfsd4: store current->tgid instead of lockowner hash in fl_pid
In reply to NeilBrownThe file_lock.fl_pid is no longer used in posix_same_owner() tests. So just set it to current->tgid for informational purposes.
### Diffstat output
./fs/nfsd/nfs4state.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
fs/nfsd/nfs4state.c renamed from fs/nfsd/nfs4state.c~current~ +5 -4
@@ -1950,9 +1950,10 @@ static inline void nfs4_set_lock_denied(struct file_lock *fl, struct nfsd4_lock_denied *deny) { struct nfs4_stateowner *sop = (struct nfs4_stateowner *) fl->fl_owner; +unsigned int hval =lockownerid_hashval (sop->so_id); deny->ld_sop =NULL ; -if (nfs4_verify_lock_stateowner (sop, fl->fl_pid)) +if (nfs4_verify_lock_stateowner (sop, hval)) deny->ld_sop = sop; deny->ld_start = fl->fl_start; deny->ld_length = ~(u64 )0 ;
@@ -2196,7 +2197,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struc goto out; } file_lock.fl_owner = (fl_owner_t ) lock->lk_stateowner; - file_lock.fl_pid =lockownerid_hashval (lock->lk_stateowner->so_id); + file_lock.fl_pid = current->tgid; file_lock.fl_file = filp; file_lock.fl_flags =FL_POSIX ;
@@ -2322,7 +2323,7 @@ nfsd4_lockt(struct svc_rqst *rqstp, stru sop = lockt->lt_stateowner;if (sop) { file_lock.fl_owner = (fl_owner_t ) sop; - file_lock.fl_pid =lockownerid_hashval (sop->so_id); + file_lock.fl_pid = current->tgid; }else { file_lock.fl_owner =NULL ; file_lock.fl_pid =0 ;
@@ -2386,7 +2387,7 @@ nfsd4_locku(struct svc_rqst *rqstp, strulocks_init_lock (&file_lock); file_lock.fl_type =F_UNLCK ; file_lock.fl_owner = (fl_owner_t ) locku->lu_stateowner; - file_lock.fl_pid =lockownerid_hashval (locku->lu_stateowner->so_id); + file_lock.fl_pid = current->tgid; file_lock.fl_file = filp; file_lock.fl_flags =FL_POSIX ; file_lock.fl_start = locku->lu_offset;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 Remove redundant initialization in nfsd4_lockt
In reply to NeilBrownNo need to set fl_owner and fl_pid to 0, since that's already been done by locks_init_lock.
### Diffstat output
./fs/nfsd/nfs4state.c | 12 +++--------- 1 files changed, 3 insertions(+), 9 deletions(-)
fs/nfsd/nfs4state.c renamed from fs/nfsd/nfs4state.c~current~ +3 -9
@@ -2268,7 +2268,6 @@ int nfsd4_lockt(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_lockt *lockt) { struct inode *inode; -struct nfs4_stateowner *sop;struct file file;struct file_lock file_lock;struct file_lock *conflicting_lock;
@@ -2320,14 +2319,9 @@ nfsd4_lockt(struct svc_rqst *rqstp, strufind_lockstateowner_str (strhashval, &lockt->lt_owner, &lockt->lt_clientid, &lockt->lt_stateowner); - sop = lockt->lt_stateowner; -if (sop) { - file_lock.fl_owner = (fl_owner_t ) sop; - file_lock.fl_pid = current->tgid; - }else { - file_lock.fl_owner =NULL ; - file_lock.fl_pid =0 ; - } +if (lockt->lt_stateowner) + file_lock.fl_owner = (fl_owner_t )lockt->lt_stateowner; + file_lock.fl_pid = current->tgid; file_lock.fl_flags =FL_POSIX ; file_lock.fl_start = lockt->lt_offset;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 nfsd4: postpone release of stateowner on CLOSE
In reply to NeilBrownPostpone the release of a stateowner on CLOSE for lease time to enable the CLOSE replay cache. Place stateowner on the close_lru list to be reaped by the laundromat service.
### Diffstat output
./fs/nfsd/nfs4state.c | 18 +++++++++++------- 1 files changed, 11 insertions(+), 7 deletions(-)
fs/nfsd/nfs4state.c renamed from fs/nfsd/nfs4state.c~current~ +11 -7
@@ -908,7 +908,7 @@ release_stateid_lockowner(struct nfs4_st }static void -release_stateowner (struct nfs4_stateowner *sop) +unhash_stateowner (struct nfs4_stateowner *sop) {struct nfs4_stateid *stp;
@@ -916,7 +916,6 @@ release_stateowner(struct nfs4_stateownelist_del (&sop->so_strhash);list_del (&sop->so_perclient);list_del (&sop->so_perlockowner); -list_del (&sop->so_close_lru); del_perclient++;while (!list_empty (&sop->so_perfilestate)) { stp = list_entry(sop->so_perfilestate.next,
@@ -926,6 +925,13 @@ release_stateowner(struct nfs4_stateowneelse release_stateid (stp,LOCK_STATE ); } +} + +static void +release_stateowner (struct nfs4_stateowner *sop) +{ +unhash_stateowner (sop); +list_del (&sop->so_close_lru);free_stateowner (sop); }
@@ -986,11 +992,8 @@ void move_to_close_lru(struct nfs4_stateowner *sop) {dprintk ("NFSD: move_to_close_lru nfs4_stateowner %p\n" , sop); -/* remove stateowner from all other hash lists except perclient */ -list_del_init (&sop->so_idhash); -list_del_init (&sop->so_strhash); -list_del_init (&sop->so_perlockowner); +unhash_stateowner (sop);list_add_tail (&sop->so_close_lru, &close_lru); sop->so_time =get_seconds (); }
@@ -1456,7 +1459,8 @@ nfs4_laundromat(void) }dprintk ("NFSD: purging unused open stateowner (so_id %d)\n" , sop->so_id); -release_stateowner (sop); +list_del (&sop->so_close_lru); +free_stateowner (sop); }if (clientid_val <NFSD_LAUNDROMAT_MINTIMEOUT ) clientid_val =NFSD_LAUNDROMAT_MINTIMEOUT ;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 trivial cleanup of nfs4state.c
In reply to NeilBrownWhitespace cleanup, fix one dprintk, remove superfluous casts of NULL.
### Diffstat output
./fs/nfsd/nfs4state.c | 72 +++++++++++++++++++++++++------------------------- 1 files changed, 36 insertions(+), 36 deletions(-)
fs/nfsd/nfs4state.c renamed from fs/nfsd/nfs4state.c~current~ +36 -36
@@ -236,7 +236,7 @@ static struct nfs4_client * create_client(struct xdr_netobj name) {struct nfs4_client *clp; -if (!(clp =alloc_client (name))) +if (!(clp =alloc_client (name))) goto out;INIT_LIST_HEAD (&clp->cl_idhash);INIT_LIST_HEAD (&clp->cl_strhash);
@@ -268,7 +268,7 @@ copy_cred(struct svc_cred *target, strucstatic int cmp_name (struct xdr_netobj *n1,struct xdr_netobj *n2) { -if (!n1 || !n2) +if (!n1 || !n2)return 0 ;return ((n1->len == n2->len) && !memcmp (n1->data, n2->data, n2->len)); }
@@ -399,7 +399,7 @@ parse_ipv4(unsigned int addr_len, char *return 0 ; } cbaddr |= (temp << shift); -if (shift >0 ) +if (shift >0 ) shift -=8 ; } *cbaddrp = cbaddr;
@@ -411,7 +411,7 @@ parse_ipv4(unsigned int addr_len, char *return 0 ; } cbport |= (temp << shift); -if (shift >0 ) +if (shift >0 ) shift -=8 ; } *cbportp = cbport;
@@ -423,7 +423,7 @@ gen_callback(struct nfs4_client *clp, st {struct nfs4_callback *cb = &clp->cl_callback; -if ( !(parse_ipv4 (se->se_callback_addr_len, se->se_callback_addr_val, +if ( !(parse_ipv4 (se->se_callback_addr_len, se->se_callback_addr_val, &cb->cb_addr, &cb->cb_port))) {printk (KERN_INFO "NFSD: BAD callback address. client will not receive delegations\n" ); cb->cb_parsed =0 ;
@@ -431,9 +431,9 @@ gen_callback(struct nfs4_client *clp, st } cb->cb_netid.len = se->se_callback_netid_len; cb->cb_netid.data = se->se_callback_netid_val; - cb->cb_prog = se->se_callback_prog; - cb->cb_ident = se->se_callback_ident; - cb->cb_parsed =1 ; + cb->cb_prog = se->se_callback_prog; + cb->cb_ident = se->se_callback_ident; + cb->cb_parsed =1 ; }/*
@@ -812,7 +812,7 @@ alloc_init_file(unsigned int hashval, st alloc_file++;return fp; } -return (struct nfs4_file *)NULL ; +return NULL ; } static void
@@ -825,7 +825,7 @@ release_all_files(void)while (!list_empty (&file_hashtbl[i])) { fp = list_entry(file_hashtbl[i].next, struct nfs4_file, fi_hash);/* this should never be more than once... */ -if (!list_empty (&fp->fi_perfile)) { +if (!list_empty (&fp->fi_perfile)) {printk ("ERROR: release_all_files: file %p is open, creating dangling state !!!\n" ,fp); }release_file (fp);
@@ -839,20 +839,20 @@ alloc_stateowner(struct xdr_netobj *ownestruct nfs4_stateowner *sop;if ((sop =kmalloc (sizeof (struct nfs4_stateowner ),GFP_KERNEL ))) { -if ((sop->so_owner.data =kmalloc (owner->len,GFP_KERNEL ))) { +if ((sop->so_owner.data =kmalloc (owner->len,GFP_KERNEL ))) {memcpy (sop->so_owner.data, owner->data, owner->len); sop->so_owner.len = owner->len;return sop; }kfree (sop); } -return (struct nfs4_stateowner *)NULL ; +return NULL ; }/* should use a slab cache */ static void free_stateowner (struct nfs4_stateowner *sop) { -if (sop) { +if (sop) {kfree (sop->so_owner.data);kfree (sop); sop =NULL ;
@@ -867,7 +867,7 @@ alloc_init_open_stateowner(unsigned intunsigned int idhashval;if (!(sop =alloc_stateowner (&open->op_owner))) -return (struct nfs4_stateowner *)NULL ; +return NULL ; idhashval =ownerid_hashval (current_ownerid);INIT_LIST_HEAD (&sop->so_idhash);INIT_LIST_HEAD (&sop->so_strhash);
@@ -921,7 +921,7 @@ release_stateowner(struct nfs4_stateownewhile (!list_empty (&sop->so_perfilestate)) { stp =list_entry (sop->so_perfilestate.next, struct nfs4_stateid, st_perfilestate); -if (sop->so_is_open_owner) +if (sop->so_is_open_owner)release_stateid (stp,OPEN_STATE );else release_stateid (stp,LOCK_STATE );
@@ -960,7 +960,7 @@ release_stateid(struct nfs4_stateid *stp list_del_perfile++;list_del (&stp->st_perfile);list_del (&stp->st_perfilestate); -if ((stp->st_vfs_set) && (flags &OPEN_STATE )) { +if ((stp->st_vfs_set) && (flags &OPEN_STATE )) {release_stateid_lockowner (stp);nfsd_close (stp->st_vfs_file); vfsclose++;
@@ -991,8 +991,8 @@ move_to_close_lru(struct nfs4_stateownerlist_del_init (&sop->so_strhash);list_del_init (&sop->so_perlockowner); -list_add_tail (&sop->so_close_lru, &close_lru); - sop->so_time =get_seconds (); +list_add_tail (&sop->so_close_lru, &close_lru); + sop->so_time =get_seconds (); }void
@@ -1030,7 +1030,7 @@ find_openstateowner_str(unsigned int hasstruct nfs4_stateowner *local =NULL ;list_for_each_entry (local, &ownerstr_hashtbl[hashval], so_strhash) { -if (!cmp_owner_str (local, &open->op_owner, &open->op_clientid)) +if (!cmp_owner_str (local, &open->op_owner, &open->op_clientid))continue ; *op = local;return (1 );
@@ -1078,7 +1078,7 @@ set_access(unsigned int *access, unsigne *access =0 ;for (i =1 ; i <4 ; i++) { -if (test_bit (i, &bmap)) +if (test_bit (i, &bmap)) *access |= i; } }
@@ -1089,7 +1089,7 @@ set_deny(unsigned int *deny, unsigned lo *deny =0 ;for (i =0 ; i <4 ; i++) { -if (test_bit (i, &bmap)) +if (test_bit (i, &bmap)) *deny |= i ; } }
@@ -1278,7 +1278,7 @@ nfsd4_process_open2(struct svc_rqst *rqs/* Search for conflicting share reservations */ status = nfserr_share_denied;list_for_each_entry (stq, &fp->fi_perfile, st_perfile) { -if (stq->st_stateowner == sop) { +if (stq->st_stateowner == sop) { stp = stq;continue ; }
@@ -1484,7 +1484,7 @@ find_openstateowner_id(u32 st_id, int fldprintk ("NFSD: find_openstateowner_id %d\n" , st_id);if (flags &CLOSE_STATE ) {list_for_each_entry (local, &close_lru, so_close_lru) { -if (local->so_id == st_id) +if (local->so_id == st_id)return local; } }
@@ -1888,16 +1888,16 @@ find_stateid(stateid_t *stid, int flags)if ((flags &LOCK_STATE ) || (flags &RDWR_STATE )) { hashval =stateid_hashval (st_id, f_id);list_for_each_entry (local, &lockstateid_hashtbl[hashval], st_hash) { -if ((local->st_stateid.si_stateownerid == st_id) && - (local->st_stateid.si_fileid == f_id)) +if ((local->st_stateid.si_stateownerid == st_id) && + (local->st_stateid.si_fileid == f_id))return local; } }if ((flags &OPEN_STATE ) || (flags &RDWR_STATE )) { hashval =stateid_hashval (st_id, f_id);list_for_each_entry (local, &stateid_hashtbl[hashval], st_hash) { -if ((local->st_stateid.si_stateownerid == st_id) && - (local->st_stateid.si_fileid == f_id)) +if ((local->st_stateid.si_stateownerid == st_id) && + (local->st_stateid.si_fileid == f_id))return local; } }else
@@ -1967,7 +1967,7 @@ find_lockstateowner(struct xdr_netobj *ofor (i =0 ; i <LOCK_HASH_SIZE ; i++) {list_for_each_entry (local, &lock_ownerid_hashtbl[i], so_idhash) { -if (!cmp_owner_str (local, owner, clid)) +if (!cmp_owner_str (local, owner, clid))continue ;return local; }
@@ -1980,7 +1980,7 @@ find_lockstateowner_str(unsigned int hasstruct nfs4_stateowner *local =NULL ;list_for_each_entry (local, &lock_ownerstr_hashtbl[hashval], so_strhash) { -if (!cmp_owner_str (local, owner, clid)) +if (!cmp_owner_str (local, owner, clid))continue ; *op = local;return (1 );
@@ -2005,7 +2005,7 @@ alloc_init_lock_stateowner(unsigned intunsigned int idhashval;if (!(sop =alloc_stateowner (&lock->lk_new_owner))) -return (struct nfs4_stateowner *)NULL ; +return NULL ; idhashval =lockownerid_hashval (current_ownerid);INIT_LIST_HEAD (&sop->so_idhash);INIT_LIST_HEAD (&sop->so_strhash);
@@ -2068,7 +2068,7 @@ int check_lock_length(u64 offset, u64 length) {return ((length ==0 ) || ((length != ~(u64 )0 ) && -LOFF_OVERFLOW (offset, length))); +LOFF_OVERFLOW (offset, length))); }/*
@@ -2210,7 +2210,7 @@ nfsd4_lock(struct svc_rqst *rqstp, struc status =posix_lock_file (filp, &file_lock);if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private) file_lock.fl_ops->fl_release_private (&file_lock); -dprintk ("NFSD: nfsd4_lock: posix_test_lock passed. posix_lock_file status %d\n" ,status); +dprintk ("NFSD: nfsd4_lock: posix_lock_file status %d\n" ,status);switch (-status) {case 0 :/* success! */ update_stateid (&lock_stp->st_stateid);
@@ -2459,7 +2459,7 @@ nfsd4_release_lockowner(struct svc_rqstnfs4_lock_state (); - status = nfs_ok; + status = nfs_ok; local =find_lockstateowner (owner, clid);if (local) {struct nfs4_stateid *stp;
@@ -2469,7 +2469,7 @@ nfsd4_release_lockowner(struct svc_rqst status = nfserr_locks_held;list_for_each_entry (stp, &local->so_perfilestate, st_perfilestate) { -if (stp->st_vfs_set) { +if (stp->st_vfs_set) {if (check_for_locks (stp->st_vfs_file, local)) goto out; }
@@ -2496,7 +2496,7 @@ alloc_reclaim(int namelen)kfree (crp);return NULL ; } -return crp; +return crp; }/*
@@ -2566,7 +2566,7 @@ nfs4_find_reclaim_client(clientid_t *cli strhashval =clientstr_hashval (client->cl_name.data, client->cl_name.len);list_for_each_entry (crp, &reclaim_str_hashtbl[strhashval], cr_strhash) { -if (cmp_name (&crp->cr_name, &client->cl_name)) { +if (cmp_name (&crp->cr_name, &client->cl_name)) {return crp; } }
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs
PATCH 1/1 fix incorrect indentation in fh_verify
In reply to NeilBrownfix incorrect indentation in fh_verify
### Diffstat output
./fs/nfsd/nfsfh.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
fs/nfsd/nfsfh.c renamed from fs/nfsd/nfsfh.c~current~ +4 -4
@@ -190,10 +190,10 @@ fh_verify(struct svc_rqst *rqstp, struct dentry =dget (exp->ex_dentry); else {struct export_operations *nop = exp->ex_mnt->mnt_sb->s_export_op; - dentry =CALL (nop,decode_fh)(exp->ex_mnt->mnt_sb, - datap, data_left, - fileid_type, - nfsd_acceptable, exp); + dentry =CALL (nop,decode_fh)(exp->ex_mnt->mnt_sb, + datap, data_left, + fileid_type, + nfsd_acceptable, exp); }if (dentry ==NULL ) goto out;
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
NFS maillist - [email protected]
https://lists.sourceforge.net/lists/listinfo/nfs