The Samba-Bugzilla – Attachment 7709 Details for
Bug 9049
access() response wrong for nocase mount / broken inode lookup cache.
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Disable the inode lookup cache for caseless mounts.
cifs_disable_lookup_cache_for_nocase.diff (text/plain), 1.53 KB, created by
Jan-Marek Glogowski
on 2012-07-18 12:15:58 UTC
(
hide
)
Description:
Disable the inode lookup cache for caseless mounts.
Filename:
MIME Type:
Creator:
Jan-Marek Glogowski
Created:
2012-07-18 12:15:58 UTC
Size:
1.53 KB
patch
obsolete
>diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c >index ec4e9a2..9ed2b8a 100644 >--- a/fs/cifs/dir.c >+++ b/fs/cifs/dir.c >@@ -660,6 +660,9 @@ lookup_out: > static int > cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) > { >+ struct cifs_sb_info *cifs_sb; >+ struct cifs_tcon *tcon; >+ > if (nd && (nd->flags & LOOKUP_RCU)) > return -ECHILD; > >@@ -703,6 +706,15 @@ cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd) > if (time_after(jiffies, direntry->d_time + HZ) || !lookupCacheEnabled) > return 0; > >+ /** >+ * Always revalidate for case insensitive connections. >+ * FIXME: correctly invalidate all matching inodes in nocase mode. >+ */ >+ cifs_sb = CIFS_SB(direntry->d_sb); >+ tcon = cifs_sb_master_tcon(cifs_sb); >+ if (tcon->nocase) >+ return 0; >+ > return 1; > } > >diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c >index 745da3d..2ec61d0 100644 >--- a/fs/cifs/inode.c >+++ b/fs/cifs/inode.c >@@ -1661,6 +1661,7 @@ cifs_inode_needs_reval(struct inode *inode) > { > struct cifsInodeInfo *cifs_i = CIFS_I(inode); > struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb); >+ struct cifs_tcon *tcon; > > if (cifs_i->clientCanCacheRead) > return false; >@@ -1680,6 +1681,15 @@ cifs_inode_needs_reval(struct inode *inode) > S_ISREG(inode->i_mode) && inode->i_nlink != 1) > return true; > >+ /** >+ * Always revalidate for case insensitive connections. >+ * FIXME: correctly invalidate all matching inodes in nocase mode, >+ * e.g. in cifs_rmdir. >+ */ >+ tcon = cifs_sb_master_tcon(cifs_sb); >+ if (tcon->nocase) >+ return true; >+ > return false; > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 9049
:
7708
| 7709 |
9068
|
9134
|
9151
|
9152