Loading fs/cifs/cifs_debug.c +20 −10 Original line number Diff line number Diff line Loading @@ -270,15 +270,25 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset, buf += item_length; length += item_length; item_length = sprintf(buf, "\nOpens: %d Deletes: %d\nMkdirs: %d Rmdirs: %d", "\nLocks: %d HardLinks: %d Symlinks: %d", atomic_read(&tcon->num_locks), atomic_read(&tcon->num_hardlinks), atomic_read(&tcon->num_symlinks)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nOpens: %d Closes: %d Deletes: %d", atomic_read(&tcon->num_opens), atomic_read(&tcon->num_deletes), atomic_read(&tcon->num_closes), atomic_read(&tcon->num_deletes)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nMkdirs: %d Rmdirs: %d", atomic_read(&tcon->num_mkdirs), atomic_read(&tcon->num_rmdirs)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nRenames: %d T2 Renames %d", item_length = sprintf(buf, "\nRenames: %d T2 Renames %d", atomic_read(&tcon->num_renames), atomic_read(&tcon->num_t2renames)); buf += item_length; Loading fs/cifs/cifsglob.h +19 −1 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ struct cifsTconInfo { atomic_t num_reads; atomic_t num_oplock_brks; atomic_t num_opens; atomic_t num_closes; atomic_t num_deletes; atomic_t num_mkdirs; atomic_t num_rmdirs; Loading @@ -223,10 +224,27 @@ struct cifsTconInfo { atomic_t num_ffirst; atomic_t num_fnext; atomic_t num_fclose; atomic_t num_hardlinks; atomic_t num_symlinks; atomic_t num_locks; #ifdef CONFIG_CIFS_STATS2 unsigned long long time_writes; unsigned long long time_reads; unsigned long long time_opens; unsigned long long time_deletes; unsigned long long time_closes; unsigned long long time_mkdirs; unsigned long long time_rmdirs; unsigned long long time_renames; unsigned long long time_t2renames; unsigned long long time_ffirst; unsigned long long time_fnext; unsigned long long time_fclose; #endif /* CONFIG_CIFS_STATS2 */ __u64 bytes_read; __u64 bytes_written; spinlock_t stat_lock; #endif #endif /* CONFIG_CIFS_STATS */ FILE_SYSTEM_DEVICE_INFO fsDevInfo; FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if file system name truncated */ FILE_SYSTEM_UNIX_INFO fsUnixInfo; Loading fs/cifs/cifssmb.c +51 −38 Original line number Diff line number Diff line Loading @@ -584,14 +584,12 @@ CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in RMFile = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_deletes); } #endif if (rc) { cFYI(1, ("Error in RMFile = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) Loading Loading @@ -633,14 +631,12 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in RMDir = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_rmdirs); } #endif if (rc) { cFYI(1, ("Error in RMDir = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) Loading Loading @@ -681,14 +677,13 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in Mkdir = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_mkdirs); } #endif if (rc) { cFYI(1, ("Error in Mkdir = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) goto MkDirRetry; Loading Loading @@ -772,6 +767,9 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, /* long_op set to 1 to allow for oplock break timeouts */ rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 1); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_opens); #endif if (rc) { cFYI(1, ("Error in Open = %d", rc)); } else { Loading @@ -789,11 +787,8 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, pfile_info->EndOfFile = pSMBr->EndOfFile; pfile_info->NumberOfLinks = cpu_to_le32(1); } #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_opens); #endif } cifs_buf_release(pSMB); if (rc == -EAGAIN) goto openRetry; Loading Loading @@ -838,6 +833,9 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_reads); #endif if (rc) { cERROR(1, ("Send error in read = %d", rc)); } else { Loading Loading @@ -940,6 +938,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, long_op); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_writes); #endif if (rc) { cFYI(1, ("Send error in write = %d", rc)); *nbytes = 0; Loading Loading @@ -1012,6 +1013,9 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, rc = SendReceive2(xid, tcon->ses, (struct smb_hdr *) pSMB, smb_hdr_len, buf, bytes_sent, &bytes_returned, long_op); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_writes); #endif if (rc) { cFYI(1, ("Send error in write = %d", rc)); *nbytes = 0; Loading Loading @@ -1087,7 +1091,9 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, timeout); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_locks); #endif if (rc) { cFYI(1, ("Send error in Lock = %d", rc)); } Loading Loading @@ -1121,6 +1127,9 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) pSMB->ByteCount = 0; rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_closes); #endif if (rc) { if(rc!=-EINTR) { /* EINTR is expected when user ctl-c to kill app */ Loading Loading @@ -1193,15 +1202,12 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Send error in rename = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_renames); } #endif if (rc) { cFYI(1, ("Send error in rename = %d", rc)); } cifs_buf_release(pSMB); Loading Loading @@ -1277,14 +1283,13 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1,("Send error in Rename (by file handle) = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&pTcon->num_t2renames); } #endif if (rc) { cFYI(1,("Send error in Rename (by file handle) = %d", rc)); } cifs_buf_release(pSMB); /* Note: On -EAGAIN error only caller can retry on handle based calls Loading Loading @@ -1438,6 +1443,9 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_symlinks); #endif if (rc) { cFYI(1, ("Send error in SetPathInfo (create symlink) = %d", Loading Loading @@ -1527,6 +1535,9 @@ CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_hardlinks); #endif if (rc) { cFYI(1, ("Send error in SetPathInfo (hard link) = %d", rc)); } Loading Loading @@ -1597,6 +1608,9 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_hardlinks); #endif if (rc) { cFYI(1, ("Send error in hard link (NT rename) = %d", rc)); } Loading Loading @@ -2519,6 +2533,9 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_ffirst); #endif if (rc) {/* BB add logic to retry regular search if Unix search rejected unexpectedly by server */ /* BB Add code to handle unsupported level rc */ Loading @@ -2532,9 +2549,6 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, if (rc == -EAGAIN) goto findFirstRetry; } else { /* decode response */ #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_ffirst); #endif /* BB remember to free buffer if error BB */ rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { Loading Loading @@ -2643,7 +2657,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_fnext); #endif if (rc) { if (rc == -EBADF) { psrch_inf->endOfSearch = TRUE; Loading @@ -2651,9 +2667,6 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, } else cFYI(1, ("FindNext returned = %d", rc)); } else { /* decode response */ #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_fnext); #endif rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { Loading fs/cifs/file.c +0 −5 Original line number Diff line number Diff line Loading @@ -746,7 +746,6 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, #ifdef CONFIG_CIFS_STATS if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -881,7 +880,6 @@ static ssize_t cifs_write(struct file *file, const char *write_data, #ifdef CONFIG_CIFS_STATS if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1248,7 +1246,6 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, } } else { #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += total_read; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1316,7 +1313,6 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, } } else { #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += total_read; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1493,7 +1489,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, i += bytes_read >> PAGE_CACHE_SHIFT; #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += bytes_read; spin_unlock(&pTcon->stat_lock); Loading fs/cifs/transport.c +1 −1 Original line number Diff line number Diff line Loading @@ -735,7 +735,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, BCC(out_buf) = le16_to_cpu(BCC(out_buf)); } else { rc = -EIO; cFYI(1,("Bad MID state? ")); cERROR(1,("Bad MID state? ")); } } cifs_no_response_exit: Loading Loading
fs/cifs/cifs_debug.c +20 −10 Original line number Diff line number Diff line Loading @@ -270,15 +270,25 @@ cifs_stats_read(char *buf, char **beginBuffer, off_t offset, buf += item_length; length += item_length; item_length = sprintf(buf, "\nOpens: %d Deletes: %d\nMkdirs: %d Rmdirs: %d", "\nLocks: %d HardLinks: %d Symlinks: %d", atomic_read(&tcon->num_locks), atomic_read(&tcon->num_hardlinks), atomic_read(&tcon->num_symlinks)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nOpens: %d Closes: %d Deletes: %d", atomic_read(&tcon->num_opens), atomic_read(&tcon->num_deletes), atomic_read(&tcon->num_closes), atomic_read(&tcon->num_deletes)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nMkdirs: %d Rmdirs: %d", atomic_read(&tcon->num_mkdirs), atomic_read(&tcon->num_rmdirs)); buf += item_length; length += item_length; item_length = sprintf(buf, "\nRenames: %d T2 Renames %d", item_length = sprintf(buf, "\nRenames: %d T2 Renames %d", atomic_read(&tcon->num_renames), atomic_read(&tcon->num_t2renames)); buf += item_length; Loading
fs/cifs/cifsglob.h +19 −1 Original line number Diff line number Diff line Loading @@ -215,6 +215,7 @@ struct cifsTconInfo { atomic_t num_reads; atomic_t num_oplock_brks; atomic_t num_opens; atomic_t num_closes; atomic_t num_deletes; atomic_t num_mkdirs; atomic_t num_rmdirs; Loading @@ -223,10 +224,27 @@ struct cifsTconInfo { atomic_t num_ffirst; atomic_t num_fnext; atomic_t num_fclose; atomic_t num_hardlinks; atomic_t num_symlinks; atomic_t num_locks; #ifdef CONFIG_CIFS_STATS2 unsigned long long time_writes; unsigned long long time_reads; unsigned long long time_opens; unsigned long long time_deletes; unsigned long long time_closes; unsigned long long time_mkdirs; unsigned long long time_rmdirs; unsigned long long time_renames; unsigned long long time_t2renames; unsigned long long time_ffirst; unsigned long long time_fnext; unsigned long long time_fclose; #endif /* CONFIG_CIFS_STATS2 */ __u64 bytes_read; __u64 bytes_written; spinlock_t stat_lock; #endif #endif /* CONFIG_CIFS_STATS */ FILE_SYSTEM_DEVICE_INFO fsDevInfo; FILE_SYSTEM_ATTRIBUTE_INFO fsAttrInfo; /* ok if file system name truncated */ FILE_SYSTEM_UNIX_INFO fsUnixInfo; Loading
fs/cifs/cifssmb.c +51 −38 Original line number Diff line number Diff line Loading @@ -584,14 +584,12 @@ CIFSSMBDelFile(const int xid, struct cifsTconInfo *tcon, const char *fileName, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in RMFile = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_deletes); } #endif if (rc) { cFYI(1, ("Error in RMFile = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) Loading Loading @@ -633,14 +631,12 @@ CIFSSMBRmDir(const int xid, struct cifsTconInfo *tcon, const char *dirName, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in RMDir = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_rmdirs); } #endif if (rc) { cFYI(1, ("Error in RMDir = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) Loading Loading @@ -681,14 +677,13 @@ CIFSSMBMkDir(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(name_len + 1); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Error in Mkdir = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_mkdirs); } #endif if (rc) { cFYI(1, ("Error in Mkdir = %d", rc)); } cifs_buf_release(pSMB); if (rc == -EAGAIN) goto MkDirRetry; Loading Loading @@ -772,6 +767,9 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, /* long_op set to 1 to allow for oplock break timeouts */ rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 1); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_opens); #endif if (rc) { cFYI(1, ("Error in Open = %d", rc)); } else { Loading @@ -789,11 +787,8 @@ CIFSSMBOpen(const int xid, struct cifsTconInfo *tcon, pfile_info->EndOfFile = pSMBr->EndOfFile; pfile_info->NumberOfLinks = cpu_to_le32(1); } #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_opens); #endif } cifs_buf_release(pSMB); if (rc == -EAGAIN) goto openRetry; Loading Loading @@ -838,6 +833,9 @@ CIFSSMBRead(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_reads); #endif if (rc) { cERROR(1, ("Send error in read = %d", rc)); } else { Loading Loading @@ -940,6 +938,9 @@ CIFSSMBWrite(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, long_op); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_writes); #endif if (rc) { cFYI(1, ("Send error in write = %d", rc)); *nbytes = 0; Loading Loading @@ -1012,6 +1013,9 @@ CIFSSMBWrite2(const int xid, struct cifsTconInfo *tcon, rc = SendReceive2(xid, tcon->ses, (struct smb_hdr *) pSMB, smb_hdr_len, buf, bytes_sent, &bytes_returned, long_op); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_writes); #endif if (rc) { cFYI(1, ("Send error in write = %d", rc)); *nbytes = 0; Loading Loading @@ -1087,7 +1091,9 @@ CIFSSMBLock(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, timeout); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_locks); #endif if (rc) { cFYI(1, ("Send error in Lock = %d", rc)); } Loading Loading @@ -1121,6 +1127,9 @@ CIFSSMBClose(const int xid, struct cifsTconInfo *tcon, int smb_file_id) pSMB->ByteCount = 0; rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_closes); #endif if (rc) { if(rc!=-EINTR) { /* EINTR is expected when user ctl-c to kill app */ Loading Loading @@ -1193,15 +1202,12 @@ CIFSSMBRename(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1, ("Send error in rename = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&tcon->num_renames); } #endif if (rc) { cFYI(1, ("Send error in rename = %d", rc)); } cifs_buf_release(pSMB); Loading Loading @@ -1277,14 +1283,13 @@ int CIFSSMBRenameOpenFile(const int xid,struct cifsTconInfo *pTcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, pTcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); if (rc) { cFYI(1,("Send error in Rename (by file handle) = %d", rc)); } #ifdef CONFIG_CIFS_STATS else { atomic_inc(&pTcon->num_t2renames); } #endif if (rc) { cFYI(1,("Send error in Rename (by file handle) = %d", rc)); } cifs_buf_release(pSMB); /* Note: On -EAGAIN error only caller can retry on handle based calls Loading Loading @@ -1438,6 +1443,9 @@ CIFSUnixCreateSymLink(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_symlinks); #endif if (rc) { cFYI(1, ("Send error in SetPathInfo (create symlink) = %d", Loading Loading @@ -1527,6 +1535,9 @@ CIFSUnixCreateHardLink(const int xid, struct cifsTconInfo *tcon, pSMB->ByteCount = cpu_to_le16(byte_count); rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_hardlinks); #endif if (rc) { cFYI(1, ("Send error in SetPathInfo (hard link) = %d", rc)); } Loading Loading @@ -1597,6 +1608,9 @@ CIFSCreateHardLink(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_hardlinks); #endif if (rc) { cFYI(1, ("Send error in hard link (NT rename) = %d", rc)); } Loading Loading @@ -2519,6 +2533,9 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_ffirst); #endif if (rc) {/* BB add logic to retry regular search if Unix search rejected unexpectedly by server */ /* BB Add code to handle unsupported level rc */ Loading @@ -2532,9 +2549,6 @@ CIFSFindFirst(const int xid, struct cifsTconInfo *tcon, if (rc == -EAGAIN) goto findFirstRetry; } else { /* decode response */ #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_ffirst); #endif /* BB remember to free buffer if error BB */ rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { Loading Loading @@ -2643,7 +2657,9 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, rc = SendReceive(xid, tcon->ses, (struct smb_hdr *) pSMB, (struct smb_hdr *) pSMBr, &bytes_returned, 0); #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_fnext); #endif if (rc) { if (rc == -EBADF) { psrch_inf->endOfSearch = TRUE; Loading @@ -2651,9 +2667,6 @@ int CIFSFindNext(const int xid, struct cifsTconInfo *tcon, } else cFYI(1, ("FindNext returned = %d", rc)); } else { /* decode response */ #ifdef CONFIG_CIFS_STATS atomic_inc(&tcon->num_fnext); #endif rc = validate_t2((struct smb_t2_rsp *)pSMBr); if(rc == 0) { Loading
fs/cifs/file.c +0 −5 Original line number Diff line number Diff line Loading @@ -746,7 +746,6 @@ ssize_t cifs_user_write(struct file *file, const char __user *write_data, #ifdef CONFIG_CIFS_STATS if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -881,7 +880,6 @@ static ssize_t cifs_write(struct file *file, const char *write_data, #ifdef CONFIG_CIFS_STATS if (total_written > 0) { atomic_inc(&pTcon->num_writes); spin_lock(&pTcon->stat_lock); pTcon->bytes_written += total_written; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1248,7 +1246,6 @@ ssize_t cifs_user_read(struct file *file, char __user *read_data, } } else { #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += total_read; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1316,7 +1313,6 @@ static ssize_t cifs_read(struct file *file, char *read_data, size_t read_size, } } else { #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += total_read; spin_unlock(&pTcon->stat_lock); Loading Loading @@ -1493,7 +1489,6 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, i += bytes_read >> PAGE_CACHE_SHIFT; #ifdef CONFIG_CIFS_STATS atomic_inc(&pTcon->num_reads); spin_lock(&pTcon->stat_lock); pTcon->bytes_read += bytes_read; spin_unlock(&pTcon->stat_lock); Loading
fs/cifs/transport.c +1 −1 Original line number Diff line number Diff line Loading @@ -735,7 +735,7 @@ SendReceive(const unsigned int xid, struct cifsSesInfo *ses, BCC(out_buf) = le16_to_cpu(BCC(out_buf)); } else { rc = -EIO; cFYI(1,("Bad MID state? ")); cERROR(1,("Bad MID state? ")); } } cifs_no_response_exit: Loading