]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/nfs4proc.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/sfrench/cifs-2.6
[linux-2.6-omap-h63xx.git] / fs / nfs / nfs4proc.c
index 4451287a81d16aa4233c39459e6995d09916ae5d..83e700a2b0c0096d100c58a31fcf3ad0023f73b6 100644 (file)
@@ -451,9 +451,7 @@ static struct nfs4_state *nfs4_try_open_cached(struct nfs4_opendata *opendata)
                /* Save the delegation */
                memcpy(stateid.data, delegation->stateid.data, sizeof(stateid.data));
                rcu_read_unlock();
-               lock_kernel();
                ret = nfs_may_open(state->inode, state->owner->so_cred, open_mode);
-               unlock_kernel();
                if (ret != 0)
                        goto out;
                ret = -EAGAIN;
@@ -1661,8 +1659,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
                struct nfs_open_context *ctx;
 
                ctx = nfs_file_open_context(sattr->ia_file);
-               cred = ctx->cred;
-               state = ctx->state;
+               if (ctx) {
+                       cred = ctx->cred;
+                       state = ctx->state;
+               }
        }
 
        status = nfs4_do_setattr(inode, cred, fattr, sattr, state);