From 5e6830c7ff1f17e5c73e029d08a2f250941723a3 Mon Sep 17 00:00:00 2001 From: Meelap Shah Date: Tue, 17 Jul 2007 04:04:40 -0700 Subject: [PATCH] --- yaml --- r: 60828 b: refs/heads/master c: 47f9940c55c0bdc65188749cae4e841601f513bb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 4 ++++ trunk/include/linux/nfsd/state.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 97d5e3b70fa9..0db4ae67c3c3 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c2f1a551dea8b37c2e0cb886885c250fb703e9d8 +refs/heads/master: 47f9940c55c0bdc65188749cae4e841601f513bb diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 46249886ea86..e4a4c87ec8c6 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -195,6 +195,8 @@ alloc_init_deleg(struct nfs4_client *clp, struct nfs4_stateid *stp, struct svc_f struct nfs4_callback *cb = &stp->st_stateowner->so_client->cl_callback; dprintk("NFSD alloc_init_deleg\n"); + if (fp->fi_had_conflict) + return NULL; if (num_delegations > max_delegations) return NULL; dp = kmem_cache_alloc(deleg_slab, GFP_KERNEL); @@ -1002,6 +1004,7 @@ alloc_init_file(struct inode *ino) list_add(&fp->fi_hash, &file_hashtbl[hashval]); fp->fi_inode = igrab(ino); fp->fi_id = current_fileid++; + fp->fi_had_conflict = false; return fp; } return NULL; @@ -1328,6 +1331,7 @@ do_recall(void *__dp) { struct nfs4_delegation *dp = __dp; + dp->dl_file->fi_had_conflict = true; nfsd4_cb_recall(dp); return 0; } diff --git a/trunk/include/linux/nfsd/state.h b/trunk/include/linux/nfsd/state.h index 732de9cad4a8..db348f749376 100644 --- a/trunk/include/linux/nfsd/state.h +++ b/trunk/include/linux/nfsd/state.h @@ -224,6 +224,7 @@ struct nfs4_file { struct inode *fi_inode; u32 fi_id; /* used with stateowner->so_id * for stateid_hashtbl hash */ + bool fi_had_conflict; }; /*