Make the get_parent() export op take a credential pointer.

Signed-off-by: David Howells <[EMAIL PROTECTED]>
---

 fs/ext3/namei.c          |    3 +--
 fs/ext3/namei.h          |    2 +-
 fs/fat/inode.c           |    2 +-
 include/linux/exportfs.h |    5 +++--
 mm/shmem.c               |    2 +-
 5 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/fs/ext3/namei.c b/fs/ext3/namei.c
index cd0fcde..aa741bb 100644
--- a/fs/ext3/namei.c
+++ b/fs/ext3/namei.c
@@ -1072,9 +1072,8 @@ static struct dentry *ext3_lookup(struct inode * dir, 
struct dentry *dentry, str
 }
 
 
-struct dentry *ext3_get_parent(struct dentry *child)
+struct dentry *ext3_get_parent(struct dentry *child, struct cred *cred)
 {
-       struct cred *cred = current->cred;
        unsigned long ino;
        struct dentry *parent;
        struct inode *inode;
diff --git a/fs/ext3/namei.h b/fs/ext3/namei.h
index f2ce2b0..53d7c59 100644
--- a/fs/ext3/namei.h
+++ b/fs/ext3/namei.h
@@ -5,4 +5,4 @@
  *
 */
 
-extern struct dentry *ext3_get_parent(struct dentry *child);
+extern struct dentry *ext3_get_parent(struct dentry *child, struct cred *cred);
diff --git a/fs/fat/inode.c b/fs/fat/inode.c
index 045647d..519e1b4 100644
--- a/fs/fat/inode.c
+++ b/fs/fat/inode.c
@@ -748,7 +748,7 @@ fat_encode_fh(struct dentry *de, __u32 *fh, int *lenp, int 
connectable)
        return 3;
 }
 
-static struct dentry *fat_get_parent(struct dentry *child)
+static struct dentry *fat_get_parent(struct dentry *child, struct cred *cred)
 {
        struct buffer_head *bh;
        struct msdos_dir_entry *de;
diff --git a/include/linux/exportfs.h b/include/linux/exportfs.h
index 8872fe8..895fd2d 100644
--- a/include/linux/exportfs.h
+++ b/include/linux/exportfs.h
@@ -73,7 +73,8 @@ struct vfsmount;
  * get_parent:
  *    @get_parent should find the parent directory for the given @child which
  *    is also a directory.  In the event that it cannot be found, or storage
- *    space cannot be allocated, a %ERR_PTR should be returned.
+ *    space cannot be allocated, a %ERR_PTR should be returned.  @cred 
indicates
+ *    the credentials to be used for the lookup.
  *
  * get_dentry:
  *    Given a &super_block (@sb) and a pointer to a file-system specific inode
@@ -103,7 +104,7 @@ struct export_operations {
                        int connectable);
        int (*get_name)(struct dentry *parent, char *name,
                        struct dentry *child);
-       struct dentry * (*get_parent)(struct dentry *child);
+       struct dentry * (*get_parent)(struct dentry *child, struct cred *cred);
        struct dentry * (*get_dentry)(struct super_block *sb, void *inump);
 
        /* This is set by the exporting module to a standard helper */
diff --git a/mm/shmem.c b/mm/shmem.c
index fc834e7..ee0b20a 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1994,7 +1994,7 @@ static struct xattr_handler *shmem_xattr_handlers[] = {
 };
 #endif
 
-static struct dentry *shmem_get_parent(struct dentry *child)
+static struct dentry *shmem_get_parent(struct dentry *child, struct cred *cred)
 {
        return ERR_PTR(-ESTALE);
 }

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to