diff options
author | Steve French <sfrench@us.ibm.com> | 2006-02-27 22:45:48 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2006-02-27 22:45:48 -0500 |
commit | d47d7c1a850b867047fe17140fabd0376894e849 (patch) | |
tree | 267b5a68a3182c937a9958ea507712f2d78db7bf /fs/cifs/file.c | |
parent | 4b8f930ff83aaed39fd5f935aeacc25f2549a51e (diff) |
[CIFS] CIFS readdir perf optimizations part 1
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/file.c')
-rw-r--r-- | fs/cifs/file.c | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 675bd2568297..e5bf1ad540d9 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c | |||
@@ -555,7 +555,10 @@ int cifs_closedir(struct inode *inode, struct file *file) | |||
555 | if (ptmp) { | 555 | if (ptmp) { |
556 | cFYI(1, ("closedir free smb buf in srch struct")); | 556 | cFYI(1, ("closedir free smb buf in srch struct")); |
557 | pCFileStruct->srch_inf.ntwrk_buf_start = NULL; | 557 | pCFileStruct->srch_inf.ntwrk_buf_start = NULL; |
558 | cifs_buf_release(ptmp); | 558 | if(pCFileStruct->srch_inf.smallBuf) |
559 | cifs_small_buf_release(ptmp); | ||
560 | else | ||
561 | cifs_buf_release(ptmp); | ||
559 | } | 562 | } |
560 | ptmp = pCFileStruct->search_resume_name; | 563 | ptmp = pCFileStruct->search_resume_name; |
561 | if (ptmp) { | 564 | if (ptmp) { |
@@ -592,11 +595,11 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
592 | pfLock->fl_end)); | 595 | pfLock->fl_end)); |
593 | 596 | ||
594 | if (pfLock->fl_flags & FL_POSIX) | 597 | if (pfLock->fl_flags & FL_POSIX) |
595 | cFYI(1, ("Posix ")); | 598 | cFYI(1, ("Posix")); |
596 | if (pfLock->fl_flags & FL_FLOCK) | 599 | if (pfLock->fl_flags & FL_FLOCK) |
597 | cFYI(1, ("Flock ")); | 600 | cFYI(1, ("Flock")); |
598 | if (pfLock->fl_flags & FL_SLEEP) { | 601 | if (pfLock->fl_flags & FL_SLEEP) { |
599 | cFYI(1, ("Blocking lock ")); | 602 | cFYI(1, ("Blocking lock")); |
600 | wait_flag = TRUE; | 603 | wait_flag = TRUE; |
601 | } | 604 | } |
602 | if (pfLock->fl_flags & FL_ACCESS) | 605 | if (pfLock->fl_flags & FL_ACCESS) |
@@ -612,21 +615,23 @@ int cifs_lock(struct file *file, int cmd, struct file_lock *pfLock) | |||
612 | cFYI(1, ("F_WRLCK ")); | 615 | cFYI(1, ("F_WRLCK ")); |
613 | numLock = 1; | 616 | numLock = 1; |
614 | } else if (pfLock->fl_type == F_UNLCK) { | 617 | } else if (pfLock->fl_type == F_UNLCK) { |
615 | cFYI(1, ("F_UNLCK ")); | 618 | cFYI(1, ("F_UNLCK")); |
616 | numUnlock = 1; | 619 | numUnlock = 1; |
620 | /* Check if unlock includes more than | ||
621 | one lock range */ | ||
617 | } else if (pfLock->fl_type == F_RDLCK) { | 622 | } else if (pfLock->fl_type == F_RDLCK) { |
618 | cFYI(1, ("F_RDLCK ")); | 623 | cFYI(1, ("F_RDLCK")); |
619 | lockType |= LOCKING_ANDX_SHARED_LOCK; | 624 | lockType |= LOCKING_ANDX_SHARED_LOCK; |
620 | numLock = 1; | 625 | numLock = 1; |
621 | } else if (pfLock->fl_type == F_EXLCK) { | 626 | } else if (pfLock->fl_type == F_EXLCK) { |
622 | cFYI(1, ("F_EXLCK ")); | 627 | cFYI(1, ("F_EXLCK")); |
623 | numLock = 1; | 628 | numLock = 1; |
624 | } else if (pfLock->fl_type == F_SHLCK) { | 629 | } else if (pfLock->fl_type == F_SHLCK) { |
625 | cFYI(1, ("F_SHLCK ")); | 630 | cFYI(1, ("F_SHLCK")); |
626 | lockType |= LOCKING_ANDX_SHARED_LOCK; | 631 | lockType |= LOCKING_ANDX_SHARED_LOCK; |
627 | numLock = 1; | 632 | numLock = 1; |
628 | } else | 633 | } else |
629 | cFYI(1, ("Unknown type of lock ")); | 634 | cFYI(1, ("Unknown type of lock")); |
630 | 635 | ||
631 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 636 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); |
632 | pTcon = cifs_sb->tcon; | 637 | pTcon = cifs_sb->tcon; |