]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
ufs: don't truncate longer ufs2 fast symlinks
authorDuane Griffin <duaneg@dghda.com>
Thu, 8 Jan 2009 22:43:49 +0000 (22:43 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 27 Mar 2009 18:43:58 +0000 (14:43 -0400)
commitf33219b7a90c4779a0b59e11fb35ebc4542db328
treea5ed8dea0850d8f9ac8d19a5477c6bbdea3fe5ce
parent9e6766cc8c125cf406960a5bfdf1455473f4835c
ufs: don't truncate longer ufs2 fast symlinks

ufs2 fast symlinks can be twice as long as ufs ones, however the code
was using the ufs size in various places. Fix that so ufs2 symlinks over
60 characters aren't truncated.

Note that we copy the entire area instead of using the maxsymlinklen field
from the superblock. This way we will be more robust against corruption (of
the superblock).

While we are at it, use memcpy instead of open-coding it with for loops.

Signed-off-by: Duane Griffin <duaneg@dghda.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ufs/inode.c
fs/ufs/ufs.h