[PVFS2-CVS] commit by robl in pvfs2-1/src/kernel/linux-2.6: namei.c
CVS commit program
cvs at parl.clemson.edu
Mon Jul 11 19:19:10 EDT 2005
Update of /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6
In directory parlweb:/tmp/cvs-serv19678/src/kernel/linux-2.6
Modified Files:
namei.c
Log Message:
[pcarns]: implement stubs for link and mknod so that the VFS will return
EOPNOTSUPP instead of the misleading EPERM.
Index: namei.c
===================================================================
RCS file: /projects/cvsroot/pvfs2-1/src/kernel/linux-2.6/namei.c,v
diff -u -w -p -u -r1.61 -r1.62
--- namei.c 7 Jul 2005 21:38:42 -0000 1.61
+++ namei.c 11 Jul 2005 22:19:10 -0000 1.62
@@ -237,6 +237,39 @@ static int pvfs2_unlink(
return ret;
}
+/* pvfs2_link() is only implemented here to make sure that we return a
+ * reasonable error code (the kernel will return a misleading EPERM
+ * otherwise). PVFS2 does not support hard links.
+ */
+static int pvfs2_link(
+ struct dentry * old_dentry,
+ struct inode * dir,
+ struct dentry *dentry)
+{
+ return(-EOPNOTSUPP);
+}
+
+/* pvfs2_mknod() is only implemented here to make sure that we return a
+ * reasonable error code (the kernel will return a misleading EPERM
+ * otherwise). PVFS2 does not support special files such as fifos or devices.
+ */
+#ifdef PVFS2_LINUX_KERNEL_2_4
+static int pvfs2_mknod(
+ struct inode *dir,
+ struct dentry *dentry,
+ int mode,
+ int rdev)
+#else
+static int pvfs2_mknod(
+ struct inode *dir,
+ struct dentry *dentry,
+ int mode,
+ dev_t rdev)
+#endif
+{
+ return(-EOPNOTSUPP);
+}
+
static int pvfs2_symlink(
struct inode *dir,
struct dentry *dentry,
@@ -409,20 +442,24 @@ struct inode_operations pvfs2_dir_inode_
#ifdef PVFS2_LINUX_KERNEL_2_4
create : pvfs2_create,
lookup : pvfs2_lookup,
+ link : pvfs2_link,
unlink : pvfs2_unlink,
symlink : pvfs2_symlink,
mkdir : pvfs2_mkdir,
rmdir : pvfs2_rmdir,
+ mknod : pvfs2_mknod,
rename : pvfs2_rename,
setattr : pvfs2_setattr,
revalidate : pvfs2_revalidate
#else
.create = pvfs2_create,
.lookup = pvfs2_lookup,
+ .link = pvfs2_link,
.unlink = pvfs2_unlink,
.symlink = pvfs2_symlink,
.mkdir = pvfs2_mkdir,
.rmdir = pvfs2_rmdir,
+ .mknod = pvfs2_mknod,
.rename = pvfs2_rename,
.setattr = pvfs2_setattr,
.getattr = pvfs2_getattr
More information about the PVFS2-CVS
mailing list