summaryrefslogtreecommitdiffstats
path: root/fs/ufs
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2008-02-08 04:20:16 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-08 09:22:33 -0800
commit90b315af12b427eeb09b2812343fb4ef9d01cf17 (patch)
tree907a54eebb048155dbbd091a11f2ff136ec45964 /fs/ufs
parent91dbbe4896f374462c5912fbb3ec0dbab4814783 (diff)
downloadlinux-90b315af12b427eeb09b2812343fb4ef9d01cf17.tar.bz2
ufs: fix symlink creation on ufs2
If we create symlink on UFS2 filesystem under Linux, it looks wrong under other OSes, because of max symlink length field was not initialized properly, and data blocks were not used to save short symlink names. [akpm@linux-foundation.org: add missing fs32_to_cpu()] Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Cc: Steven <stevenaaus@yahoo.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/ufs')
-rw-r--r--fs/ufs/super.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 73deff475e63..d18ccf36ba34 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -131,6 +131,8 @@ static void ufs_print_super_stuff(struct super_block *sb,
printk(KERN_INFO" cs_nffree(Num of free frags): %llu\n",
(unsigned long long)
fs64_to_cpu(sb, usb3->fs_un1.fs_u2.cs_nffree));
+ printk(KERN_INFO" fs_maxsymlinklen: %u\n",
+ fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen));
} else {
printk(" sblkno: %u\n", fs32_to_cpu(sb, usb1->fs_sblkno));
printk(" cblkno: %u\n", fs32_to_cpu(sb, usb1->fs_cblkno));
@@ -1061,8 +1063,8 @@ magic_found:
uspi->s_bpf = uspi->s_fsize << 3;
uspi->s_bpfshift = uspi->s_fshift + 3;
uspi->s_bpfmask = uspi->s_bpf - 1;
- if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) ==
- UFS_MOUNT_UFSTYPE_44BSD)
+ if ((sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_44BSD ||
+ (sbi->s_mount_opt & UFS_MOUNT_UFSTYPE) == UFS_MOUNT_UFSTYPE_UFS2)
uspi->s_maxsymlinklen =
fs32_to_cpu(sb, usb3->fs_un2.fs_44.fs_maxsymlinklen);