Loading fs/cifs/asn1.c +4 −6 Original line number Diff line number Diff line Loading @@ -386,9 +386,8 @@ asn1_oid_decode(struct asn1_ctx *ctx, size = eoc - ctx->pointer + 1; *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); if (*oid == NULL) { if (*oid == NULL) return 0; } optr = *oid; Loading Loading @@ -581,8 +580,7 @@ decode_negTokenInit(unsigned char *security_blob, int length, return 0; } else if ((cls != ASN1_UNI) || (con != ASN1_CON) || (tag != ASN1_SEQ)) { cFYI(1, ("Exit 6 cls = %d con = %d tag = %d end = %p (%d)", cFYI(1, ("cls = %d con = %d tag = %d end = %p (%d)", cls, con, tag, end, *end)); } Loading fs/cifs/cifsfs.c +10 −10 Original line number Diff line number Diff line Loading @@ -240,9 +240,9 @@ static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) cifs_sb = CIFS_SB(inode->i_sb); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) return 0; } else /* file mode might have been restricted at mount time else /* file mode might have been restricted at mount time on the client (above and beyond ACL on servers) for servers which do not support setting and viewing mode bits, so allowing client to check permissions is useful */ Loading Loading @@ -882,7 +882,8 @@ static int cifs_oplock_thread(void *dummyarg) the call */ /* mutex_lock(&inode->i_mutex);*/ if (S_ISREG(inode->i_mode)) { rc = filemap_fdatawrite(inode->i_mapping); rc = filemap_fdatawrite(inode->i_mapping); if (CIFS_I(inode)->clientCanCacheRead == 0) { filemap_fdatawait(inode->i_mapping); Loading @@ -907,8 +908,7 @@ static int cifs_oplock_thread(void *dummyarg) 0 /* len */ , 0 /* offset */, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, 0 /* wait flag */); cFYI(1, ("Oplock release rc = %d ", rc)); cFYI(1, ("Oplock release rc = %d", rc)); } } else spin_unlock(&GlobalMid_Lock); Loading fs/cifs/cifssmb.c +20 −24 Original line number Diff line number Diff line Loading @@ -94,10 +94,9 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon) write_lock(&GlobalSMBSeslock); list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { open_file = list_entry(tmp, struct cifsFileInfo, tlist); if (open_file) { if (open_file) open_file->invalidHandle = TRUE; } } write_unlock(&GlobalSMBSeslock); /* BB Add call to invalidate_inodes(sb) for all superblocks mounted to this tcon */ Loading Loading @@ -1193,9 +1192,9 @@ SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, } if (*pOplock & REQ_OPLOCK) pSMB->OpenFlags = cpu_to_le16(REQ_OPLOCK); else if (*pOplock & REQ_BATCHOPLOCK) { else if (*pOplock & REQ_BATCHOPLOCK) pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); } pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ /* 0 = read Loading Loading @@ -1310,9 +1309,8 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, } if (*pOplock & REQ_OPLOCK) pSMB->OpenFlags = cpu_to_le32(REQ_OPLOCK); else if (*pOplock & REQ_BATCHOPLOCK) { else if (*pOplock & REQ_BATCHOPLOCK) pSMB->OpenFlags = cpu_to_le32(REQ_BATCHOPLOCK); } pSMB->DesiredAccess = cpu_to_le32(access_flags); pSMB->AllocationSize = 0; /* set file as system file if special file such Loading Loading @@ -2615,7 +2613,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, reparse_buf->TargetNameOffset + reparse_buf->TargetNameLen) > end_of_smb) { cFYI(1,("reparse buf goes beyond SMB")); cFYI(1, ("reparse buf beyond SMB")); rc = -EIO; goto qreparse_out; } Loading Loading @@ -3883,12 +3881,10 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, pSMB->hdr.Mid = GetNextMid(ses->server); pSMB->hdr.Tid = ses->ipc_tid; pSMB->hdr.Uid = ses->Suid; if (ses->capabilities & CAP_STATUS32) { if (ses->capabilities & CAP_STATUS32) pSMB->hdr.Flags2 |= SMBFLG2_ERR_STATUS; } if (ses->capabilities & CAP_DFS) { if (ses->capabilities & CAP_DFS) pSMB->hdr.Flags2 |= SMBFLG2_DFS; } if (ses->capabilities & CAP_UNICODE) { pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; Loading fs/cifs/connect.c +20 −28 Original line number Diff line number Diff line Loading @@ -151,10 +151,9 @@ cifs_reconnect(struct TCP_Server_Info *server) } list_for_each(tmp, &GlobalTreeConnectionList) { tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); if ((tcon) && (tcon->ses) && (tcon->ses->server == server)) { if ((tcon) && (tcon->ses) && (tcon->ses->server == server)) tcon->tidStatus = CifsNeedReconnect; } } read_unlock(&GlobalSMBSeslock); /* do not want to be sending data on a socket we are freeing */ down(&server->tcpSem); Loading Loading @@ -358,11 +357,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) length = tcpSesAllocCount.counter; write_unlock(&GlobalSMBSeslock); complete(&cifsd_complete); if (length > 1) { mempool_resize(cifs_req_poolp, length + cifs_min_rcv, if (length > 1) mempool_resize(cifs_req_poolp, length + cifs_min_rcv, GFP_KERNEL); } set_freezable(); while (!kthread_should_stop()) { Loading Loading @@ -632,9 +629,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) /* Was previous buf put in mpx struct for multi-rsp? */ if (!isMultiRsp) { /* smb buffer will be freed by user thread */ if (isLargeBuf) { if (isLargeBuf) bigbuf = NULL; } else else smallbuf = NULL; } wake_up_process(task_to_wake); Loading Loading @@ -703,10 +700,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); if (ses->server == server) { if (ses->server == server) ses->status = CifsExiting; } } spin_lock(&GlobalMid_Lock); list_for_each(tmp, &server->pending_mid_q) { Loading @@ -715,11 +711,10 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) cFYI(1, ("Clearing Mid 0x%x - waking up ", mid_entry->mid)); task_to_wake = mid_entry->tsk; if (task_to_wake) { if (task_to_wake) wake_up_process(task_to_wake); } } } spin_unlock(&GlobalMid_Lock); read_unlock(&GlobalSMBSeslock); /* 1/8th of sec is more than enough time for them to exit */ Loading Loading @@ -750,18 +745,15 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); if (ses->server == server) { if (ses->server == server) ses->server = NULL; } } write_unlock(&GlobalSMBSeslock); kfree(server); if (length > 0) { mempool_resize(cifs_req_poolp, length + cifs_min_rcv, if (length > 0) mempool_resize(cifs_req_poolp, length + cifs_min_rcv, GFP_KERNEL); } return 0; } Loading fs/cifs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -1067,7 +1067,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) for (i = 0; (i < num_to_fill) && (rc == 0); i++) { if (current_entry == NULL) { /* evaluate whether this case is an error */ cERROR(1,("past end of SMB num to fill %d i %d", cERROR(1, ("past SMB end, num to fill %d i %d", num_to_fill, i)); break; } Loading Loading
fs/cifs/asn1.c +4 −6 Original line number Diff line number Diff line Loading @@ -386,9 +386,8 @@ asn1_oid_decode(struct asn1_ctx *ctx, size = eoc - ctx->pointer + 1; *oid = kmalloc(size * sizeof(unsigned long), GFP_ATOMIC); if (*oid == NULL) { if (*oid == NULL) return 0; } optr = *oid; Loading Loading @@ -581,8 +580,7 @@ decode_negTokenInit(unsigned char *security_blob, int length, return 0; } else if ((cls != ASN1_UNI) || (con != ASN1_CON) || (tag != ASN1_SEQ)) { cFYI(1, ("Exit 6 cls = %d con = %d tag = %d end = %p (%d)", cFYI(1, ("cls = %d con = %d tag = %d end = %p (%d)", cls, con, tag, end, *end)); } Loading
fs/cifs/cifsfs.c +10 −10 Original line number Diff line number Diff line Loading @@ -240,9 +240,9 @@ static int cifs_permission(struct inode *inode, int mask, struct nameidata *nd) cifs_sb = CIFS_SB(inode->i_sb); if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) { if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_PERM) return 0; } else /* file mode might have been restricted at mount time else /* file mode might have been restricted at mount time on the client (above and beyond ACL on servers) for servers which do not support setting and viewing mode bits, so allowing client to check permissions is useful */ Loading Loading @@ -882,7 +882,8 @@ static int cifs_oplock_thread(void *dummyarg) the call */ /* mutex_lock(&inode->i_mutex);*/ if (S_ISREG(inode->i_mode)) { rc = filemap_fdatawrite(inode->i_mapping); rc = filemap_fdatawrite(inode->i_mapping); if (CIFS_I(inode)->clientCanCacheRead == 0) { filemap_fdatawait(inode->i_mapping); Loading @@ -907,8 +908,7 @@ static int cifs_oplock_thread(void *dummyarg) 0 /* len */ , 0 /* offset */, 0, 0, LOCKING_ANDX_OPLOCK_RELEASE, 0 /* wait flag */); cFYI(1, ("Oplock release rc = %d ", rc)); cFYI(1, ("Oplock release rc = %d", rc)); } } else spin_unlock(&GlobalMid_Lock); Loading
fs/cifs/cifssmb.c +20 −24 Original line number Diff line number Diff line Loading @@ -94,10 +94,9 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon) write_lock(&GlobalSMBSeslock); list_for_each_safe(tmp, tmp1, &pTcon->openFileList) { open_file = list_entry(tmp, struct cifsFileInfo, tlist); if (open_file) { if (open_file) open_file->invalidHandle = TRUE; } } write_unlock(&GlobalSMBSeslock); /* BB Add call to invalidate_inodes(sb) for all superblocks mounted to this tcon */ Loading Loading @@ -1193,9 +1192,9 @@ SMBLegacyOpen(const int xid, struct cifsTconInfo *tcon, } if (*pOplock & REQ_OPLOCK) pSMB->OpenFlags = cpu_to_le16(REQ_OPLOCK); else if (*pOplock & REQ_BATCHOPLOCK) { else if (*pOplock & REQ_BATCHOPLOCK) pSMB->OpenFlags = cpu_to_le16(REQ_BATCHOPLOCK); } pSMB->OpenFlags |= cpu_to_le16(REQ_MORE_INFO); /* BB fixme add conversion for access_flags to bits 0 - 2 of mode */ /* 0 = read Loading Loading @@ -1310,9 +1309,8 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, } if (*pOplock & REQ_OPLOCK) pSMB->OpenFlags = cpu_to_le32(REQ_OPLOCK); else if (*pOplock & REQ_BATCHOPLOCK) { else if (*pOplock & REQ_BATCHOPLOCK) pSMB->OpenFlags = cpu_to_le32(REQ_BATCHOPLOCK); } pSMB->DesiredAccess = cpu_to_le32(access_flags); pSMB->AllocationSize = 0; /* set file as system file if special file such Loading Loading @@ -2615,7 +2613,7 @@ CIFSSMBQueryReparseLinkInfo(const int xid, struct cifsTconInfo *tcon, reparse_buf->TargetNameOffset + reparse_buf->TargetNameLen) > end_of_smb) { cFYI(1,("reparse buf goes beyond SMB")); cFYI(1, ("reparse buf beyond SMB")); rc = -EIO; goto qreparse_out; } Loading Loading @@ -3883,12 +3881,10 @@ CIFSGetDFSRefer(const int xid, struct cifsSesInfo *ses, pSMB->hdr.Mid = GetNextMid(ses->server); pSMB->hdr.Tid = ses->ipc_tid; pSMB->hdr.Uid = ses->Suid; if (ses->capabilities & CAP_STATUS32) { if (ses->capabilities & CAP_STATUS32) pSMB->hdr.Flags2 |= SMBFLG2_ERR_STATUS; } if (ses->capabilities & CAP_DFS) { if (ses->capabilities & CAP_DFS) pSMB->hdr.Flags2 |= SMBFLG2_DFS; } if (ses->capabilities & CAP_UNICODE) { pSMB->hdr.Flags2 |= SMBFLG2_UNICODE; Loading
fs/cifs/connect.c +20 −28 Original line number Diff line number Diff line Loading @@ -151,10 +151,9 @@ cifs_reconnect(struct TCP_Server_Info *server) } list_for_each(tmp, &GlobalTreeConnectionList) { tcon = list_entry(tmp, struct cifsTconInfo, cifsConnectionList); if ((tcon) && (tcon->ses) && (tcon->ses->server == server)) { if ((tcon) && (tcon->ses) && (tcon->ses->server == server)) tcon->tidStatus = CifsNeedReconnect; } } read_unlock(&GlobalSMBSeslock); /* do not want to be sending data on a socket we are freeing */ down(&server->tcpSem); Loading Loading @@ -358,11 +357,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) length = tcpSesAllocCount.counter; write_unlock(&GlobalSMBSeslock); complete(&cifsd_complete); if (length > 1) { mempool_resize(cifs_req_poolp, length + cifs_min_rcv, if (length > 1) mempool_resize(cifs_req_poolp, length + cifs_min_rcv, GFP_KERNEL); } set_freezable(); while (!kthread_should_stop()) { Loading Loading @@ -632,9 +629,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) /* Was previous buf put in mpx struct for multi-rsp? */ if (!isMultiRsp) { /* smb buffer will be freed by user thread */ if (isLargeBuf) { if (isLargeBuf) bigbuf = NULL; } else else smallbuf = NULL; } wake_up_process(task_to_wake); Loading Loading @@ -703,10 +700,9 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); if (ses->server == server) { if (ses->server == server) ses->status = CifsExiting; } } spin_lock(&GlobalMid_Lock); list_for_each(tmp, &server->pending_mid_q) { Loading @@ -715,11 +711,10 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) cFYI(1, ("Clearing Mid 0x%x - waking up ", mid_entry->mid)); task_to_wake = mid_entry->tsk; if (task_to_wake) { if (task_to_wake) wake_up_process(task_to_wake); } } } spin_unlock(&GlobalMid_Lock); read_unlock(&GlobalSMBSeslock); /* 1/8th of sec is more than enough time for them to exit */ Loading Loading @@ -750,18 +745,15 @@ cifs_demultiplex_thread(struct TCP_Server_Info *server) list_for_each(tmp, &GlobalSMBSessionList) { ses = list_entry(tmp, struct cifsSesInfo, cifsSessionList); if (ses->server == server) { if (ses->server == server) ses->server = NULL; } } write_unlock(&GlobalSMBSeslock); kfree(server); if (length > 0) { mempool_resize(cifs_req_poolp, length + cifs_min_rcv, if (length > 0) mempool_resize(cifs_req_poolp, length + cifs_min_rcv, GFP_KERNEL); } return 0; } Loading
fs/cifs/readdir.c +1 −1 Original line number Diff line number Diff line Loading @@ -1067,7 +1067,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) for (i = 0; (i < num_to_fill) && (rc == 0); i++) { if (current_entry == NULL) { /* evaluate whether this case is an error */ cERROR(1,("past end of SMB num to fill %d i %d", cERROR(1, ("past SMB end, num to fill %d i %d", num_to_fill, i)); break; } Loading