Commit e8aea2e4 authored by Steve French's avatar Steve French Committed by Steve French

Fix blocksize and allocation size mismatch

parent dc70efa7
......@@ -19,10 +19,11 @@ Patch Contributors
------------------
Zwane Mwaikambo
Andi Kleen
Amrut Joshi
Test case and Bug Report contributors
-------------------------------------
Thanks to those in the community who have submitted detailed bug reports
and debug of problems they have found: Jochen Dolze, David Blaine,
Rene Scharfe, Martin Josefsson and others.
Rene Scharfe, Martin Josefsson, Alexander Wild and others.
......@@ -206,6 +206,9 @@ cifs_alloc_inode(struct super_block *sb)
file data or metadata */
cifs_inode->clientCanCacheRead = FALSE;
cifs_inode->clientCanCacheAll = FALSE;
cifs_inode->vfs_inode.i_blksize = CIFS_MAX_MSGSIZE;
cifs_inode->vfs_inode.i_blkbits = 14; /* 2**14 = CIFS_MAX_MSGSIZE */
INIT_LIST_HEAD(&cifs_inode->openFileList);
return &cifs_inode->vfs_inode;
}
......
......@@ -277,9 +277,6 @@ cifs_get_inode_info(struct inode **pinode, const unsigned char *search_path,
inode->i_blocks =
(inode->i_blksize - 1 + pfindData->AllocationSize) >> inode->i_blkbits;
cFYI(1,
(" Size %ld and blocks %ld ",
(unsigned long) inode->i_size, inode->i_blocks));
inode->i_nlink = le32_to_cpu(pfindData->NumberOfLinks);
/* BB fill in uid and gid here? with help from winbind?
......@@ -543,13 +540,13 @@ cifs_revalidate(struct dentry *direntry)
direntry->d_inode->i_count.counter, direntry,
direntry->d_time, jiffies));
cifsInode = CIFS_I(direntry->d_inode);
/* BB add check - do not need to revalidate oplocked files */
if (time_before(jiffies, cifsInode->time + HZ)) {
if (time_before(jiffies, cifsInode->time + HZ) && lookupCacheEnabled) {
if((S_ISREG(direntry->d_inode->i_mode) == 0) ||
(direntry->d_inode->i_nlink == 1) ||
(lookupCacheEnabled == 0)) {
(direntry->d_inode->i_nlink == 1)) {
if (full_path)
kfree(full_path);
FreeXid(xid);
......
......@@ -55,6 +55,8 @@ void
_FreeXid(unsigned int xid)
{
write_lock(&GlobalMid_Lock);
/* if(GlobalTotalActiveXid == 0)
BUG(); */
GlobalTotalActiveXid--;
write_unlock(&GlobalMid_Lock);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment