From: Boaz Harrosh <bharrosh@panasas.com>
To: Avishay Traeger <avishay@gmail.com>,
Jeff Garzik <jeff@garzik.org>,
Andrew Morton <akpm@linux-foundation.org>,
Evgeniy Polyakov <zbr@ioremap.net>,
linux-fsdevel <linux-fsdevel@vger.ke
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
James Bottomley <James.Bottomley@HansenPartnership.com>,
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Subject: [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations
Date: Wed, 18 Mar 2009 20:01:10 +0200 [thread overview]
Message-ID: <1237399270-29274-1-git-send-email-bharrosh@panasas.com> (raw)
In-Reply-To: <49C1331D.1080805@panasas.com>
Generic implementation of symlink ops.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
---
fs/exofs/Kbuild | 2 +-
fs/exofs/exofs.h | 4 +++
fs/exofs/symlink.c | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 62 insertions(+), 1 deletions(-)
create mode 100644 fs/exofs/symlink.c
diff --git a/fs/exofs/Kbuild b/fs/exofs/Kbuild
index 269281f..42d5299 100644
--- a/fs/exofs/Kbuild
+++ b/fs/exofs/Kbuild
@@ -26,5 +26,5 @@ KBUILD_CPPFLAGS := -I$(OSD_INC) $(KBUILD_CPPFLAGS)
endif
-exofs-y := osd.o inode.o file.o
+exofs-y := osd.o inode.o file.o symlink.o
obj-$(CONFIG_EXOFS_FS) += exofs.o
diff --git a/fs/exofs/exofs.h b/fs/exofs/exofs.h
index 28deb67..d3b8bde 100644
--- a/fs/exofs/exofs.h
+++ b/fs/exofs/exofs.h
@@ -138,4 +138,8 @@ int exofs_setattr(struct dentry *, struct iattr *);
extern const struct inode_operations exofs_file_inode_operations;
extern const struct file_operations exofs_file_operations;
+/* symlink.c */
+extern const struct inode_operations exofs_symlink_inode_operations;
+extern const struct inode_operations exofs_fast_symlink_inode_operations;
+
#endif
diff --git a/fs/exofs/symlink.c b/fs/exofs/symlink.c
new file mode 100644
index 0000000..36e2d7b
--- /dev/null
+++ b/fs/exofs/symlink.c
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2005, 2006
+ * Avishay Traeger (avishay@gmail.com) (avishay@il.ibm.com)
+ * Copyright (C) 2005, 2006
+ * International Business Machines
+ * Copyright (C) 2008, 2009
+ * Boaz Harrosh <bharrosh@panasas.com>
+ *
+ * Copyrights for code taken from ext2:
+ * Copyright (C) 1992, 1993, 1994, 1995
+ * Remy Card (card@masi.ibp.fr)
+ * Laboratoire MASI - Institut Blaise Pascal
+ * Universite Pierre et Marie Curie (Paris VI)
+ * from
+ * linux/fs/minix/inode.c
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ *
+ * This file is part of exofs.
+ *
+ * exofs is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation. Since it is based on ext2, and the only
+ * valid version of GPL for the Linux kernel is version 2, the only valid
+ * version of GPL for exofs is version 2.
+ *
+ * exofs is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with exofs; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include <linux/namei.h>
+
+#include "exofs.h"
+
+static void *exofs_follow_link(struct dentry *dentry, struct nameidata *nd)
+{
+ struct exofs_i_info *oi = exofs_i(dentry->d_inode);
+
+ nd_set_link(nd, (char *)oi->i_data);
+ return NULL;
+}
+
+const struct inode_operations exofs_symlink_inode_operations = {
+ .readlink = generic_readlink,
+ .follow_link = page_follow_link_light,
+ .put_link = page_put_link,
+};
+
+const struct inode_operations exofs_fast_symlink_inode_operations = {
+ .readlink = generic_readlink,
+ .follow_link = exofs_follow_link,
+};
--
1.6.2.1
next prev parent reply other threads:[~2009-03-18 18:03 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-18 17:45 [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-18 17:57 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Boaz Harrosh
2009-03-18 17:58 ` [PATCH 2/8] exofs: file and file_inode operations Boaz Harrosh
2009-03-31 8:04 ` Andrew Morton
2009-03-31 8:58 ` Boaz Harrosh
2009-03-18 18:01 ` Boaz Harrosh [this message]
2009-03-18 18:04 ` [PATCH 4/8] exofs: address_space_operations Boaz Harrosh
2009-03-22 10:22 ` Marcin Slusarz
2009-03-22 10:41 ` Boaz Harrosh
2009-03-22 13:58 ` [PATCH 4/8 ver5] " Boaz Harrosh
2009-03-31 8:04 ` Andrew Morton
2009-03-31 9:04 ` Boaz Harrosh
2009-03-31 10:15 ` Andrew Morton
2009-03-31 10:27 ` Boaz Harrosh
2009-03-18 18:08 ` [PATCH 5/8] exofs: dir_inode and directory operations Boaz Harrosh
2009-03-31 8:04 ` Andrew Morton
2009-03-31 10:22 ` Boaz Harrosh
2009-03-18 18:09 ` [PATCH 6/8] exofs: super_operations and file_system_type Boaz Harrosh
2009-03-31 8:04 ` Andrew Morton
2009-03-31 10:29 ` Boaz Harrosh
2009-03-31 18:52 ` [osd-dev] " Benny Halevy
2009-04-01 8:05 ` Boaz Harrosh
2009-04-01 9:06 ` Benny Halevy
2009-03-18 18:10 ` [PATCH 7/8] exofs: Documentation Boaz Harrosh
2009-03-21 13:26 ` Evgeniy Polyakov
2009-03-22 8:42 ` Boaz Harrosh
2009-03-18 18:11 ` [PATCH 8/8] fs: Add exofs to Kernel build Boaz Harrosh
2009-03-23 13:06 ` [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Boaz Harrosh
2009-03-24 9:07 ` Boaz Harrosh
2009-03-30 21:22 ` Andrew Morton
2009-03-31 3:01 ` Stephen Rothwell
2009-03-31 7:13 ` Evgeniy Polyakov
2009-03-31 7:20 ` Boaz Harrosh
2009-03-31 7:41 ` Boaz Harrosh
2009-03-31 8:04 ` Andrew Morton
[not found] ` <1237399056-29171-1-git-send-email-bharrosh@panasas.com>
2009-03-31 8:04 ` [PATCH 1/8] exofs: Kbuild, Headers and osd utils Andrew Morton
2009-03-31 8:57 ` Boaz Harrosh
2009-04-01 9:23 ` [PATCHSET 0/8 version 4] exofs for kernel 2.6.30 Jeff Garzik
2009-04-01 11:21 ` Boaz Harrosh
2009-04-02 0:39 ` Jeff Garzik
2009-04-02 12:49 ` Boaz Harrosh
-- strict thread matches above, loose matches on Subject: below --
2009-02-09 13:07 [PATCHSET 0/8 version 3] exofs Boaz Harrosh
2009-02-09 13:20 ` [PATCH 3/8] exofs: symlink_inode and fast_symlink_inode operations Boaz Harrosh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1237399270-29274-1-git-send-email-bharrosh@panasas.com \
--to=bharrosh@panasas.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=akpm@linux-foundation.org \
--cc=avishay@gmail.com \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=jeff@garzik.org \
--cc=linux-fsdevel@vger.ke \
--cc=linux-kernel@vger.kernel.org \
--cc=zbr@ioremap.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).