Boaz Harrosh | 982980d | 2008-10-27 19:04:34 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2005, 2006 |
| 3 | * Avishay Traeger (avishay@gmail.com) (avishay@il.ibm.com) |
| 4 | * Copyright (C) 2005, 2006 |
| 5 | * International Business Machines |
| 6 | * Copyright (C) 2008, 2009 |
| 7 | * Boaz Harrosh <bharrosh@panasas.com> |
| 8 | * |
| 9 | * Copyrights for code taken from ext2: |
| 10 | * Copyright (C) 1992, 1993, 1994, 1995 |
| 11 | * Remy Card (card@masi.ibp.fr) |
| 12 | * Laboratoire MASI - Institut Blaise Pascal |
| 13 | * Universite Pierre et Marie Curie (Paris VI) |
| 14 | * from |
| 15 | * linux/fs/minix/inode.c |
| 16 | * Copyright (C) 1991, 1992 Linus Torvalds |
| 17 | * |
| 18 | * This file is part of exofs. |
| 19 | * |
| 20 | * exofs is free software; you can redistribute it and/or modify |
| 21 | * it under the terms of the GNU General Public License as published by |
| 22 | * the Free Software Foundation. Since it is based on ext2, and the only |
| 23 | * valid version of GPL for the Linux kernel is version 2, the only valid |
| 24 | * version of GPL for exofs is version 2. |
| 25 | * |
| 26 | * exofs is distributed in the hope that it will be useful, |
| 27 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 28 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 29 | * GNU General Public License for more details. |
| 30 | * |
| 31 | * You should have received a copy of the GNU General Public License |
| 32 | * along with exofs; if not, write to the Free Software |
| 33 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 34 | */ |
| 35 | |
| 36 | #include <linux/namei.h> |
| 37 | |
| 38 | #include "exofs.h" |
| 39 | |
| 40 | static void *exofs_follow_link(struct dentry *dentry, struct nameidata *nd) |
| 41 | { |
| 42 | struct exofs_i_info *oi = exofs_i(dentry->d_inode); |
| 43 | |
| 44 | nd_set_link(nd, (char *)oi->i_data); |
| 45 | return NULL; |
| 46 | } |
| 47 | |
| 48 | const struct inode_operations exofs_symlink_inode_operations = { |
| 49 | .readlink = generic_readlink, |
| 50 | .follow_link = page_follow_link_light, |
| 51 | .put_link = page_put_link, |
| 52 | }; |
| 53 | |
| 54 | const struct inode_operations exofs_fast_symlink_inode_operations = { |
| 55 | .readlink = generic_readlink, |
| 56 | .follow_link = exofs_follow_link, |
| 57 | }; |