[linux-cifs-client] [PATCH] backported CIFS: account for move of
rlim from task_struct to signal_struct
Jeff Layton
jlayton at redhat.com
Fri May 4 20:46:19 GMT 2007
On Wed, Apr 04, 2007 at 11:14:10PM -0500, Steve French wrote:
> http://pserver.samba.org/samba/ftp/cifs-cvs/cifs-1.48a.tar.gz
>
> Let me know if you have an older 2.6 kernel that this does not build on
> (I tried 2.6.21 and 2.6.18)
>
Hi Steve,
I was working on backporting this for 2.6.9. The code doesn't seem to take
into account the move of the rlim struct from the task_struct to the
signal_struct that happened ~Oct 2004. The following patch fixed this for me,
but the KERNEL_VERSION is likely not correct:
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 6fe80c6..df0e3fd 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -1178,7 +1178,11 @@ static int cifs_vmtruncate(struct inode * inode, loff_t offset)
goto out_truncate;
do_expand:
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 9, 0)
limit = current->signal->rlim[RLIMIT_FSIZE].rlim_cur;
+#else
+ limit = current->rlim[RLIMIT_FSIZE].rlim_cur;
+#endif
if (limit != RLIM_INFINITY && offset > limit) {
spin_unlock(&inode->i_lock);
goto out_sig;
More information about the linux-cifs-client
mailing list