All of lore.kernel.org
 help / color / mirror / Atom feed
* + fs-affs-bugfix-make-symbolic-links-work-again.patch added to -mm tree
@ 2017-04-18 22:08 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2017-04-18 22:08 UTC (permalink / raw)
  To: fabf, duaneg, viro, mm-commits


The patch titled
     Subject: fs/affs: bugfix: make symbolic links work again
has been added to the -mm tree.  Its filename is
     fs-affs-bugfix-make-symbolic-links-work-again.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/fs-affs-bugfix-make-symbolic-links-work-again.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/fs-affs-bugfix-make-symbolic-links-work-again.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/SubmitChecklist when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Fabian Frederick <fabf@skynet.be>
Subject: fs/affs: bugfix: make symbolic links work again

AFFS symbolic links were broken since kernel 2.6.29

Problem was bisected to the following

commit ebd09abbd969 ("vfs: ensure page symlinks are NUL-terminated")
commit 035146851cfa ("vfs: introduce helper function to safely NUL-terminate symlinks")

AFFS wasn't setting inode size when reading symbolic link from disk or
creating a new one. Result was zero allocation in pagecache.

ln -s file symlink

ls -lrt

file
symlink ->

This patch adds inode isize information on inode get and symbolic link
addition.

Link: http://lkml.kernel.org/r/20170415065436.13518-1-fabf@skynet.be
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Cc: Duane Griffin <duaneg@dghda.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/affs/inode.c |    1 +
 fs/affs/namei.c |    1 +
 2 files changed, 2 insertions(+)

diff -puN fs/affs/inode.c~fs-affs-bugfix-make-symbolic-links-work-again fs/affs/inode.c
--- a/fs/affs/inode.c~fs-affs-bugfix-make-symbolic-links-work-again
+++ a/fs/affs/inode.c
@@ -140,6 +140,7 @@ struct inode *affs_iget(struct super_blo
 		inode->i_fop = &affs_file_operations;
 		break;
 	case ST_SOFTLINK:
+		inode->i_size = strlen((char *)AFFS_HEAD(bh)->table);
 		inode->i_mode |= S_IFLNK;
 		inode_nohighmem(inode);
 		inode->i_op = &affs_symlink_inode_operations;
diff -puN fs/affs/namei.c~fs-affs-bugfix-make-symbolic-links-work-again fs/affs/namei.c
--- a/fs/affs/namei.c~fs-affs-bugfix-make-symbolic-links-work-again
+++ a/fs/affs/namei.c
@@ -365,6 +365,7 @@ affs_symlink(struct inode *dir, struct d
 				symname++;
 	}
 	*p = 0;
+	inode->i_size = i + 1;
 	mark_buffer_dirty_inode(bh, inode);
 	affs_brelse(bh);
 	mark_inode_dirty(inode);
_

Patches currently in -mm which might be from fabf@skynet.be are

fs-affs-bugfix-make-symbolic-links-work-again.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-04-18 22:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 22:08 + fs-affs-bugfix-make-symbolic-links-work-again.patch added to -mm tree akpm

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.