svn commit: linux-cifs-client r77 - in
branches/linux-converged-for-old-kernels/fs/cifs: .
sfrench at samba.org
sfrench at samba.org
Mon Aug 21 21:10:49 GMT 2006
Author: sfrench
Date: 2006-08-21 21:10:48 +0000 (Mon, 21 Aug 2006)
New Revision: 77
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=linux-cifs-client&rev=77
Log:
more 2.4 cifs merge
Modified:
branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
Changeset:
Modified: branches/linux-converged-for-old-kernels/fs/cifs/readdir.c
===================================================================
--- branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2006-08-21 20:37:35 UTC (rev 76)
+++ branches/linux-converged-for-old-kernels/fs/cifs/readdir.c 2006-08-21 21:10:48 UTC (rev 77)
@@ -113,7 +113,11 @@
char * buf, int *pobject_type, int isNewInode)
{
loff_t local_size;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct timespec local_mtime;
+#else
+ time_t local_mtime;
+#endif
struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb);
@@ -210,7 +214,11 @@
if (is_size_safe_to_change(cifsInfo)) {
/* can not safely change the file size here if the
client is writing to it due to potential races */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
i_size_write(tmp_inode, end_of_file);
+#else
+ tmp_inode->i_size = end_of_file;
+#endif
/* 512 bytes (2**9) is the fake blocksize that must be used */
/* for this calculation, even though the reported blocksize is larger */
@@ -255,7 +263,11 @@
} else {
/* file may have changed on server */
cFYI(1, ("invalidate inode, readdir detected change"));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
invalidate_remote_inode(tmp_inode);
+#else
+ invalidate_inode_pages(tmp_inode);
+#endif
}
} else if (S_ISDIR(tmp_inode->i_mode)) {
cFYI(1, ("Directory inode"));
@@ -275,7 +287,11 @@
FILE_UNIX_INFO *pfindData, int *pobject_type, int isNewInode)
{
loff_t local_size;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
struct timespec local_mtime;
+#else
+ time_t local_mtime;
+#endif
struct cifsInodeInfo *cifsInfo = CIFS_I(tmp_inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(tmp_inode->i_sb);
@@ -340,7 +356,11 @@
if (is_size_safe_to_change(cifsInfo)) {
/* can not safely change the file size here if the
client is writing to it due to potential races */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
i_size_write(tmp_inode,end_of_file);
+#else
+ tmp_inode->i_size = end_of_file;
+#endif
/* 512 bytes (2**9) is the fake blocksize that must be used */
/* for this calculation, not the real blocksize */
@@ -379,7 +399,11 @@
} else {
/* file may have changed on server */
cFYI(1, ("invalidate inode, readdir detected change"));
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 5, 0)
invalidate_remote_inode(tmp_inode);
+#else
+ invalidate_inode_pages(tmp_inode);
+#endif
}
} else if (S_ISDIR(tmp_inode->i_mode)) {
cFYI(1, ("Directory inode"));
More information about the samba-cvs
mailing list