aboutsummaryrefslogtreecommitdiffstats
path: root/fs/minix
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2009-01-06 17:42:38 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 18:59:27 -0500
commitd6b54841f4ddd836c886d1e6ac381cf309ee98a3 (patch)
tree106537060ff79fc597942743acd32fa8b3e8a0fd /fs/minix
parent4fb6de2561d5c47f3539a7b412108164d79fbb96 (diff)
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: Evgeniy Dushistov <dushistov@mail.ru> Cc: Nick Piggin <nickpiggin@yahoo.com.au> Cc: <stable@kernel.org> [2.6.lots] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/minix')
-rw-r--r--fs/minix/dir.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/minix/dir.c b/fs/minix/dir.c
index f70433816a38..d4946c4c90e2 100644
--- a/fs/minix/dir.c
+++ b/fs/minix/dir.c
@@ -280,7 +280,7 @@ int minix_add_link(struct dentry *dentry, struct inode *inode)
280 return -EINVAL; 280 return -EINVAL;
281 281
282got_it: 282got_it:
283 pos = (page->index >> PAGE_CACHE_SHIFT) + p - (char*)page_address(page); 283 pos = page_offset(page) + p - (char *)page_address(page);
284 err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize, 284 err = __minix_write_begin(NULL, page->mapping, pos, sbi->s_dirsize,
285 AOP_FLAG_UNINTERRUPTIBLE, &page, NULL); 285 AOP_FLAG_UNINTERRUPTIBLE, &page, NULL);
286 if (err) 286 if (err)