[linux-cifs-client,1/3] cifs: rename cifs_iget to cifs_root_iget
diff mbox

Message ID 1238936961-6979-2-git-send-email-jlayton@redhat.com
State New, archived
Headers show

Commit Message

Jeff Layton April 5, 2009, 1:09 p.m. UTC
The current cifs_iget isn't suitable for anything but the root inode.
Rename it with a more appropriate name.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
 fs/cifs/cifsfs.c |    2 +-
 fs/cifs/cifsfs.h |    2 +-
 fs/cifs/inode.c  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

Comments

Christoph Hellwig April 5, 2009, 1:42 p.m. UTC | #1
On Sun, Apr 05, 2009 at 09:09:19AM -0400, Jeff Layton wrote:
> The current cifs_iget isn't suitable for anything but the root inode.
> Rename it with a more appropriate name.

And using it for the root inode is stupid, too as it can't be in cache.

The root inode is the case where you can easily use new_inode.
Jeff Layton April 5, 2009, 1:54 p.m. UTC | #2
On Sun, 5 Apr 2009 09:42:14 -0400
Christoph Hellwig <hch@infradead.org> wrote:

> On Sun, Apr 05, 2009 at 09:09:19AM -0400, Jeff Layton wrote:
> > The current cifs_iget isn't suitable for anything but the root inode.
> > Rename it with a more appropriate name.
> 
> And using it for the root inode is stupid, too as it can't be in cache.
> 
> The root inode is the case where you can easily use new_inode.
> 

Yep. We might want to just get rid of that eventually and move the IPC
stuff elsewhere. With the follow-on patches here, I think using iget
makes the code a little simpler so I'll leave this in place for now.

Patch
diff mbox

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 34f5701..f0fb524 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -148,7 +148,7 @@  cifs_read_super(struct super_block *sb, void *data,
 #endif
 	sb->s_blocksize = CIFS_MAX_MSGSIZE;
 	sb->s_blocksize_bits = 14;	/* default 2**14 = CIFS_MAX_MSGSIZE */
-	inode = cifs_iget(sb, ROOT_I);
+	inode = cifs_root_iget(sb, ROOT_I);
 
 	if (IS_ERR(inode)) {
 		rc = PTR_ERR(inode);
diff --git a/fs/cifs/cifsfs.h b/fs/cifs/cifsfs.h
index 77e190d..fa3694e 100644
--- a/fs/cifs/cifsfs.h
+++ b/fs/cifs/cifsfs.h
@@ -36,7 +36,7 @@  extern void cifs_read_inode(struct inode *);
 
 /* Functions related to inodes */
 extern const struct inode_operations cifs_dir_inode_ops;
-extern struct inode *cifs_iget(struct super_block *, unsigned long);
+extern struct inode *cifs_root_iget(struct super_block *, unsigned long);
 extern int cifs_create(struct inode *, struct dentry *, int,
 		       struct nameidata *);
 extern struct dentry *cifs_lookup(struct inode *, struct dentry *,
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index 8faf275..b67c527 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -699,7 +699,7 @@  char *cifs_build_path_to_root(struct cifs_sb_info *cifs_sb)
 }
 
 /* gets root inode */
-struct inode *cifs_iget(struct super_block *sb, unsigned long ino)
+struct inode *cifs_root_iget(struct super_block *sb, unsigned long ino)
 {
 	int xid;
 	struct cifs_sb_info *cifs_sb;