diff options
author | Evgeniy Dushistov <dushistov@mail.ru> | 2009-01-06 14:42:38 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-01-18 10:43:47 -0800 |
commit | 2906f0338509bf9a5f5a89f07cf592523133b8b2 (patch) | |
tree | f496f3dd74682b85156eae961f844546c93c5779 | |
parent | 4a2ef76a1ad491ac798316ebbff00780da67916f (diff) |
minix: fix add link's wrong position calculation
commit d6b54841f4ddd836c886d1e6ac381cf309ee98a3 upstream.
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>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | fs/minix/dir.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/minix/dir.c b/fs/minix/dir.c index f70433816a3..d4946c4c90e 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) 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) |