diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-25 18:42:04 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-03-03 23:00:23 -0500 |
commit | d5dc77bfeeab0b03a32e3db5e31e2f64605634ab (patch) | |
tree | 7cdf557d1310db607d164d576d8cc5799d4aaf36 /fs/dcookies.c | |
parent | 76b021d053ed0b8de9689eefca5e8f53dade7fd7 (diff) |
consolidate compat lookup_dcookie()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/dcookies.c')
-rw-r--r-- | fs/dcookies.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/dcookies.c b/fs/dcookies.c index f08375b97ffb..ab5954b50267 100644 --- a/fs/dcookies.c +++ b/fs/dcookies.c | |||
@@ -25,6 +25,7 @@ | |||
25 | #include <linux/dcookies.h> | 25 | #include <linux/dcookies.h> |
26 | #include <linux/mutex.h> | 26 | #include <linux/mutex.h> |
27 | #include <linux/path.h> | 27 | #include <linux/path.h> |
28 | #include <linux/compat.h> | ||
28 | #include <asm/uaccess.h> | 29 | #include <asm/uaccess.h> |
29 | 30 | ||
30 | /* The dcookies are allocated from a kmem_cache and | 31 | /* The dcookies are allocated from a kmem_cache and |
@@ -202,6 +203,17 @@ out: | |||
202 | return err; | 203 | return err; |
203 | } | 204 | } |
204 | 205 | ||
206 | #ifdef CONFIG_COMPAT | ||
207 | COMPAT_SYSCALL_DEFINE4(lookup_dcookie, u32, w0, u32, w1, char __user *, buf, size_t, len) | ||
208 | { | ||
209 | #ifdef __BIG_ENDIAN | ||
210 | return sys_lookup_dcookie(((u64)w0 << 32) | w1, buf, len); | ||
211 | #else | ||
212 | return sys_lookup_dcookie(((u64)w1 << 32) | w0, buf, len); | ||
213 | #endif | ||
214 | } | ||
215 | #endif | ||
216 | |||
205 | static int dcookie_init(void) | 217 | static int dcookie_init(void) |
206 | { | 218 | { |
207 | struct list_head * d; | 219 | struct list_head * d; |