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.

[[email protected]: coding-style fixes]
Signed-off-by: Evgeniy Dushistov <[email protected]>
Cc: Nick Piggin <[email protected]>
Cc: <[email protected]>		[2.6.lots]
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
Evgeniy Dushistov 2009-01-06 14:42:38 -08:00 • committed by Linus Torvalds
commit d6b54841f4

View file

@ -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)