diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/cifsfs.c ./cifsfs.c --- /home/stevef/linux/cifs-2.6/fs/cifs/cifsfs.c 2005-10-11 16:12:39.000000000 -0500 +++ ./cifsfs.c 2005-10-12 15:53:24.000000000 -0500 @@ -32,6 +32,7 @@ #include #include #include +#include #include "cifsfs.h" #include "cifspdu.h" #define DECLARE_GLOBALS_HERE @@ -231,7 +232,7 @@ 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 */ - return generic_permission(inode, mask, NULL); + return vfs_permission(inode, mask); } static kmem_cache_t *cifs_inode_cachep; @@ -816,9 +817,9 @@ oplockThread = current; do { - if(try_to_freeze()) - continue; - + if (current->flags & PF_FREEZE) + refrigerator(PF_FREEZE); + spin_lock(&GlobalMid_Lock); if(list_empty(&GlobalOplock_Q)) { spin_unlock(&GlobalMid_Lock); @@ -882,8 +883,9 @@ dnotifyThread = current; do { - if(try_to_freeze()) - continue; + if(current->flags & PF_FREEZE) + refrigerator(PF_FREEZE); + set_current_state(TASK_INTERRUPTIBLE); schedule_timeout(39*HZ); } while(!signal_pending(current)); diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/cifsfs.h ./cifsfs.h --- /home/stevef/linux/cifs-2.6/fs/cifs/cifsfs.h 2005-10-11 16:12:39.000000000 -0500 +++ ./cifsfs.h 2005-10-12 14:54:50.000000000 -0500 @@ -84,8 +84,8 @@ extern struct dentry_operations cifs_ci_dentry_ops; /* Functions related to symlinks */ -extern void *cifs_follow_link(struct dentry *direntry, struct nameidata *nd); -extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *); +extern int cifs_follow_link(struct dentry *direntry, struct nameidata *nd); +extern void cifs_put_link(struct dentry *direntry, struct nameidata *nd); extern int cifs_readlink(struct dentry *direntry, char __user *buffer, int buflen); extern int cifs_symlink(struct inode *inode, struct dentry *direntry, diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/connect.c ./connect.c --- /home/stevef/linux/cifs-2.6/fs/cifs/connect.c 2005-10-12 10:52:33.000000000 -0500 +++ ./connect.c 2005-10-12 15:58:36.000000000 -0500 @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include "cifspdu.h" @@ -357,8 +358,9 @@ } while (server->tcpStatus != CifsExiting) { - if(try_to_freeze()) - continue; + if (current->flags & PF_FREEZE) + refrigerator(PF_FREEZE); + if (bigbuf == NULL) { bigbuf = cifs_buf_get(); if(bigbuf == NULL) { @@ -1846,8 +1848,6 @@ sb->s_maxbytes = (u64) 1 << 31; /* 2 GB */ } - sb->s_time_gran = 100; - /* on error free sesinfo and tcon struct if needed */ if (rc) { /* if session setup failed, use count is zero but diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/file.c ./file.c --- /home/stevef/linux/cifs-2.6/fs/cifs/file.c 2005-10-12 10:52:33.000000000 -0500 +++ ./file.c 2005-10-12 17:20:18.206916600 -0500 @@ -760,8 +760,7 @@ if (file->f_dentry) { if (file->f_dentry->d_inode) { struct inode *inode = file->f_dentry->d_inode; - inode->i_ctime = inode->i_mtime = - current_fs_time(inode->i_sb); + inode->i_ctime = inode->i_mtime = CURRENT_TIME; if (total_written > 0) { if (*poffset > file->f_dentry->d_inode->i_size) i_size_write(file->f_dentry->d_inode, @@ -982,7 +981,7 @@ bytes_written = cifs_write(open_file->pfile, write_data, to-from, &offset); /* Does mm or vfs already set times? */ - inode->i_atime = inode->i_mtime = current_fs_time(inode->i_sb); + inode->i_atime = inode->i_mtime = CURRENT_TIME; if ((bytes_written > 0) && (offset)) { rc = 0; } else if (bytes_written < 0) { @@ -1011,6 +1010,7 @@ pgoff_t index; int is_range = 0; struct kvec iov[32]; + int len; int n_iov = 0; pgoff_t next; int nr_pages; @@ -1124,16 +1124,26 @@ unlock_page(page); break; } + + if (page_offset(page) >= mapping->host->i_size) { + done = 1; + unlock_page(page); + break; + } + /* * BB can we get rid of this? pages are held by pvec */ page_cache_get(page); + len = min(mapping->host->i_size - page_offset(page), + (loff_t)PAGE_CACHE_SIZE); + /* reserve iov[0] for the smb header */ n_iov++; iov[n_iov].iov_base = kmap(page); - iov[n_iov].iov_len = PAGE_CACHE_SIZE; - bytes_to_write += PAGE_CACHE_SIZE; + iov[n_iov].iov_len = len; + bytes_to_write += len; if (first < 0) { first = i; @@ -1729,8 +1739,7 @@ else cFYI(1, ("Bytes read %d ",rc)); - file->f_dentry->d_inode->i_atime = - current_fs_time(file->f_dentry->d_inode->i_sb); + file->f_dentry->d_inode->i_atime = CURRENT_TIME; if (PAGE_CACHE_SIZE > rc) memset(read_data + rc, 0, PAGE_CACHE_SIZE - rc); diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/inode.c ./inode.c --- /home/stevef/linux/cifs-2.6/fs/cifs/inode.c 2005-10-05 22:03:43.000000000 -0500 +++ ./inode.c 2005-10-12 14:54:50.000000000 -0500 @@ -559,9 +559,9 @@ cifsInode = CIFS_I(direntry->d_inode); cifsInode->time = 0; /* will force revalidate to get info when needed */ - direntry->d_inode->i_ctime = current_fs_time(inode->i_sb); + direntry->d_inode->i_ctime = CURRENT_TIME; } - inode->i_ctime = inode->i_mtime = current_fs_time(inode->i_sb); + inode->i_ctime = inode->i_mtime = CURRENT_TIME; cifsInode = CIFS_I(inode); cifsInode->time = 0; /* force revalidate of dir as well */ @@ -681,7 +681,7 @@ cifsInode->time = 0; /* force revalidate to go get info when needed */ direntry->d_inode->i_ctime = inode->i_ctime = inode->i_mtime = - current_fs_time(inode->i_sb); + CURRENT_TIME; kfree(full_path); FreeXid(xid); diff -Nau /home/stevef/linux/cifs-2.6/fs/cifs/link.c ./link.c --- /home/stevef/linux/cifs-2.6/fs/cifs/link.c 2005-10-05 21:17:08.000000000 -0500 +++ ./link.c 2005-10-12 14:54:50.000000000 -0500 @@ -92,7 +92,7 @@ return rc; } -void * +int cifs_follow_link(struct dentry *direntry, struct nameidata *nd) { struct inode *inode = direntry->d_inode; @@ -148,7 +148,7 @@ out_no_free: FreeXid(xid); nd_set_link(nd, target_path); - return NULL; /* No cookie */ + return 0; } int @@ -333,7 +333,7 @@ return rc; } -void cifs_put_link(struct dentry *direntry, struct nameidata *nd, void *cookie) +void cifs_put_link(struct dentry *direntry, struct nameidata *nd) { char *p = nd_get_link(nd); if (!IS_ERR(p)) Common subdirectories: /home/stevef/linux/cifs-2.6/fs/cifs/.tmp_versions and ./.tmp_versions