X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fcifs%2Ffile.c;h=14938ee4f6e47425a5e08003657fdc04c3f40ad4;hb=0ff78a221bf7839a7f20be9929433d17e868e987;hp=1246cf74e1fb4220502127d448f612a910110d89;hpb=fb1214e48f735cdb68446adb77ec37aa3de60697;p=cascardo%2Flinux.git diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 1246cf74e1fb..14938ee4f6e4 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -326,10 +326,13 @@ void cifsFileInfo_put(struct cifsFileInfo *cifs_file) cancel_work_sync(&cifs_file->oplock_break); if (!tcon->need_reconnect && !cifs_file->invalidHandle) { + struct TCP_Server_Info *server = tcon->ses->server; unsigned int xid; - int rc; + int rc = -ENOSYS; + xid = get_xid(); - rc = CIFSSMBClose(xid, tcon, cifs_file->fid.netfid); + if (server->ops->close) + rc = server->ops->close(xid, tcon, &cifs_file->fid); free_xid(xid); } @@ -423,7 +426,8 @@ int cifs_open(struct inode *inode, struct file *file) cfile = cifs_new_fileinfo(&fid, file, tlink, oplock); if (cfile == NULL) { - CIFSSMBClose(xid, tcon, fid.netfid); + if (tcon->ses->server->ops->close) + tcon->ses->server->ops->close(xid, tcon, &fid); rc = -ENOMEM; goto out; }