lkml.org 
[lkml]   [2001]   [Oct]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH] tmpfs symlink size bug
From
Since 2.4.12 the size of symlinks on tmpfs has been off by one.  The
following patch corrects that error.
--
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email: Herbert Xu ~{PmV>HI~} <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
Index: mm/shmem.c
===================================================================
RCS file: /home/gondolin/herbert/src/CVS/debian/kernel-source-2.4/mm/shmem.c,v
retrieving revision 1.1.1.16
diff -u -r1.1.1.16 shmem.c
--- mm/shmem.c 17 Oct 2001 21:19:20 -0000 1.1.1.16
+++ mm/shmem.c 27 Oct 2001 23:34:51 -0000
@@ -1157,7 +1157,7 @@

inode = dentry->d_inode;
info = SHMEM_I(inode);
- inode->i_size = len;
+ inode->i_size = len - 1;
if (len <= sizeof(struct shmem_inode_info)) {
/* do it inline */
memcpy(info, symname, len);
\
 
 \ /
  Last update: 2005-03-22 13:11    [W:0.077 / U:24.712 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site