LINUX: Return NULL for afs_linux_raw_open error
[openafs.git] / src / afs / VNOPS / afs_vnop_write.c
index be6c63a..c7c56dc 100644 (file)
@@ -335,6 +335,7 @@ afs_write(struct vcache *avc, struct uio *auio, int aio,
            error = code;
            ZapDCE(tdc);        /* bad data */
            cfile = afs_CFileOpen(&tdc->f.inode);
+            osi_Assert(cfile);
            afs_CFileTruncate(cfile, 0);
            afs_CFileClose(cfile);
            afs_AdjustSize(tdc, 0);     /* sets f.chunkSize to 0 */