aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/readdir.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2009-02-11 08:08:26 -0500
committerSteve French <sfrench@us.ibm.com>2009-02-20 22:37:08 -0500
commit950ec52880fab89b957c7dc45e8b8476dd63741f (patch)
treedfb8bd4bdf0e455fefd453c4e899276641a60394 /fs/cifs/readdir.c
parent132ac7b77cc95a22d6118d327c96586759fbf006 (diff)
cifs: properly handle case where CIFSGetSrvInodeNumber fails
...if it does then we pass a pointer to an unintialized variable for the inode number to cifs_new_inode. Have it pass a NULL pointer instead. Also tweak the function prototypes to reduce the amount of casting. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r--fs/cifs/readdir.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index 02a20221e841..c2c01ff4c32c 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -61,7 +61,7 @@ static inline void dump_cifs_file_struct(struct file *file, char *label)
61static int 61static int
62construct_dentry(struct qstr *qstring, struct file *file, 62construct_dentry(struct qstr *qstring, struct file *file,
63 struct inode **ptmp_inode, struct dentry **pnew_dentry, 63 struct inode **ptmp_inode, struct dentry **pnew_dentry,
64 unsigned long *inum) 64 __u64 *inum)
65{ 65{
66 struct dentry *tmp_dentry = NULL; 66 struct dentry *tmp_dentry = NULL;
67 struct super_block *sb = file->f_path.dentry->d_sb; 67 struct super_block *sb = file->f_path.dentry->d_sb;
@@ -820,7 +820,7 @@ static int find_cifs_entry(const int xid, struct cifsTconInfo *pTcon,
820/* inode num, inode type and filename returned */ 820/* inode num, inode type and filename returned */
821static int cifs_get_name_from_search_buf(struct qstr *pqst, 821static int cifs_get_name_from_search_buf(struct qstr *pqst,
822 char *current_entry, __u16 level, unsigned int unicode, 822 char *current_entry, __u16 level, unsigned int unicode,
823 struct cifs_sb_info *cifs_sb, int max_len, ino_t *pinum) 823 struct cifs_sb_info *cifs_sb, int max_len, __u64 *pinum)
824{ 824{
825 int rc = 0; 825 int rc = 0;
826 unsigned int len = 0; 826 unsigned int len = 0;
@@ -903,7 +903,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file,
903 struct qstr qstring; 903 struct qstr qstring;
904 struct cifsFileInfo *pCifsF; 904 struct cifsFileInfo *pCifsF;
905 unsigned int obj_type; 905 unsigned int obj_type;
906 ino_t inum; 906 __u64 inum;
907 struct cifs_sb_info *cifs_sb; 907 struct cifs_sb_info *cifs_sb;
908 struct inode *tmp_inode; 908 struct inode *tmp_inode;
909 struct dentry *tmp_dentry; 909 struct dentry *tmp_dentry;