Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d6b54841 authored by Evgeniy Dushistov's avatar Evgeniy Dushistov Committed by Linus Torvalds
Browse files

minix: fix add link's wrong position calculation



Fix the add link method.  The oosition in the directory was calculated in
wrong way - it had the incorrect shift direction.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarEvgeniy Dushistov <dushistov@mail.ru>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Cc: <stable@kernel.org>		[2.6.lots]
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 4fb6de25
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode)
	return -EINVAL;

got_it:
	pos = (page->index >> PAGE_CACHE_SHIFT) + p - (char*)page_address(page);
	pos = page_offset(page) + p - (char *)page_address(page);
	err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize,
					AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
	if (err)