Skip to content

Commit

Permalink
minix: fix add link's wrong position calculation
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Dushistov authored and torvalds committed Jan 6, 2009
1 parent 4fb6de2 commit d6b5484
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/minix/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d6b5484

Please sign in to comment.