]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfs/nfs4proc.c
fat: Fix _fat_bmap() race
[linux-2.6-omap-h63xx.git] / fs / nfs / nfs4proc.c
index c910413eaecafd80ff2c6012dda6baad388cc6dd..83e700a2b0c0096d100c58a31fcf3ad0023f73b6 100644 (file)
@@ -1659,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);