diff options
author | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 18:34:51 -0500 |
---|---|---|
committer | David Woodhouse <dwmw2@infradead.org> | 2007-01-17 18:34:51 -0500 |
commit | 9cdf083f981b8d37b3212400a359368661385099 (patch) | |
tree | aa15a6a08ad87e650dea40fb59b3180bef0d345b /fs/cifs/readdir.c | |
parent | e499e01d234a31d59679b7b1e1cf628d917ba49a (diff) | |
parent | a8b3485287731978899ced11f24628c927890e78 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/cifs/readdir.c')
-rw-r--r-- | fs/cifs/readdir.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index ed18c3965f7b..99dfb5337e31 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c | |||
@@ -68,30 +68,30 @@ static int construct_dentry(struct qstr *qstring, struct file *file, | |||
68 | int rc = 0; | 68 | int rc = 0; |
69 | 69 | ||
70 | cFYI(1, ("For %s", qstring->name)); | 70 | cFYI(1, ("For %s", qstring->name)); |
71 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 71 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
72 | pTcon = cifs_sb->tcon; | 72 | pTcon = cifs_sb->tcon; |
73 | 73 | ||
74 | qstring->hash = full_name_hash(qstring->name, qstring->len); | 74 | qstring->hash = full_name_hash(qstring->name, qstring->len); |
75 | tmp_dentry = d_lookup(file->f_dentry, qstring); | 75 | tmp_dentry = d_lookup(file->f_path.dentry, qstring); |
76 | if (tmp_dentry) { | 76 | if (tmp_dentry) { |
77 | cFYI(0, ("existing dentry with inode 0x%p", tmp_dentry->d_inode)); | 77 | cFYI(0, ("existing dentry with inode 0x%p", tmp_dentry->d_inode)); |
78 | *ptmp_inode = tmp_dentry->d_inode; | 78 | *ptmp_inode = tmp_dentry->d_inode; |
79 | /* BB overwrite old name? i.e. tmp_dentry->d_name and tmp_dentry->d_name.len??*/ | 79 | /* BB overwrite old name? i.e. tmp_dentry->d_name and tmp_dentry->d_name.len??*/ |
80 | if(*ptmp_inode == NULL) { | 80 | if(*ptmp_inode == NULL) { |
81 | *ptmp_inode = new_inode(file->f_dentry->d_sb); | 81 | *ptmp_inode = new_inode(file->f_path.dentry->d_sb); |
82 | if(*ptmp_inode == NULL) | 82 | if(*ptmp_inode == NULL) |
83 | return rc; | 83 | return rc; |
84 | rc = 1; | 84 | rc = 1; |
85 | } | 85 | } |
86 | } else { | 86 | } else { |
87 | tmp_dentry = d_alloc(file->f_dentry, qstring); | 87 | tmp_dentry = d_alloc(file->f_path.dentry, qstring); |
88 | if(tmp_dentry == NULL) { | 88 | if(tmp_dentry == NULL) { |
89 | cERROR(1,("Failed allocating dentry")); | 89 | cERROR(1,("Failed allocating dentry")); |
90 | *ptmp_inode = NULL; | 90 | *ptmp_inode = NULL; |
91 | return rc; | 91 | return rc; |
92 | } | 92 | } |
93 | 93 | ||
94 | *ptmp_inode = new_inode(file->f_dentry->d_sb); | 94 | *ptmp_inode = new_inode(file->f_path.dentry->d_sb); |
95 | if (pTcon->nocase) | 95 | if (pTcon->nocase) |
96 | tmp_dentry->d_op = &cifs_ci_dentry_ops; | 96 | tmp_dentry->d_op = &cifs_ci_dentry_ops; |
97 | else | 97 | else |
@@ -432,10 +432,10 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
432 | cifsFile->invalidHandle = TRUE; | 432 | cifsFile->invalidHandle = TRUE; |
433 | cifsFile->srch_inf.endOfSearch = FALSE; | 433 | cifsFile->srch_inf.endOfSearch = FALSE; |
434 | 434 | ||
435 | if(file->f_dentry == NULL) | 435 | if(file->f_path.dentry == NULL) |
436 | return -ENOENT; | 436 | return -ENOENT; |
437 | 437 | ||
438 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 438 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
439 | if(cifs_sb == NULL) | 439 | if(cifs_sb == NULL) |
440 | return -EINVAL; | 440 | return -EINVAL; |
441 | 441 | ||
@@ -443,7 +443,7 @@ static int initiate_cifs_search(const int xid, struct file *file) | |||
443 | if(pTcon == NULL) | 443 | if(pTcon == NULL) |
444 | return -EINVAL; | 444 | return -EINVAL; |
445 | 445 | ||
446 | full_path = build_path_from_dentry(file->f_dentry); | 446 | full_path = build_path_from_dentry(file->f_path.dentry); |
447 | 447 | ||
448 | if(full_path == NULL) { | 448 | if(full_path == NULL) { |
449 | return -ENOMEM; | 449 | return -ENOMEM; |
@@ -609,10 +609,10 @@ static int is_dir_changed(struct file * file) | |||
609 | struct inode * inode; | 609 | struct inode * inode; |
610 | struct cifsInodeInfo *cifsInfo; | 610 | struct cifsInodeInfo *cifsInfo; |
611 | 611 | ||
612 | if(file->f_dentry == NULL) | 612 | if(file->f_path.dentry == NULL) |
613 | return 0; | 613 | return 0; |
614 | 614 | ||
615 | inode = file->f_dentry->d_inode; | 615 | inode = file->f_path.dentry->d_inode; |
616 | 616 | ||
617 | if(inode == NULL) | 617 | if(inode == NULL) |
618 | return 0; | 618 | return 0; |
@@ -839,7 +839,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
839 | if((scratch_buf == NULL) || (pfindEntry == NULL) || (pCifsF == NULL)) | 839 | if((scratch_buf == NULL) || (pfindEntry == NULL) || (pCifsF == NULL)) |
840 | return -ENOENT; | 840 | return -ENOENT; |
841 | 841 | ||
842 | if(file->f_dentry == NULL) | 842 | if(file->f_path.dentry == NULL) |
843 | return -ENOENT; | 843 | return -ENOENT; |
844 | 844 | ||
845 | rc = cifs_entry_is_dot(pfindEntry,pCifsF); | 845 | rc = cifs_entry_is_dot(pfindEntry,pCifsF); |
@@ -847,7 +847,7 @@ static int cifs_filldir(char *pfindEntry, struct file *file, | |||
847 | if(rc != 0) | 847 | if(rc != 0) |
848 | return 0; | 848 | return 0; |
849 | 849 | ||
850 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 850 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
851 | 851 | ||
852 | qstring.name = scratch_buf; | 852 | qstring.name = scratch_buf; |
853 | rc = cifs_get_name_from_search_buf(&qstring,pfindEntry, | 853 | rc = cifs_get_name_from_search_buf(&qstring,pfindEntry, |
@@ -985,12 +985,12 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
985 | 985 | ||
986 | xid = GetXid(); | 986 | xid = GetXid(); |
987 | 987 | ||
988 | if(file->f_dentry == NULL) { | 988 | if(file->f_path.dentry == NULL) { |
989 | FreeXid(xid); | 989 | FreeXid(xid); |
990 | return -EIO; | 990 | return -EIO; |
991 | } | 991 | } |
992 | 992 | ||
993 | cifs_sb = CIFS_SB(file->f_dentry->d_sb); | 993 | cifs_sb = CIFS_SB(file->f_path.dentry->d_sb); |
994 | pTcon = cifs_sb->tcon; | 994 | pTcon = cifs_sb->tcon; |
995 | if(pTcon == NULL) | 995 | if(pTcon == NULL) |
996 | return -EINVAL; | 996 | return -EINVAL; |
@@ -998,7 +998,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
998 | switch ((int) file->f_pos) { | 998 | switch ((int) file->f_pos) { |
999 | case 0: | 999 | case 0: |
1000 | if (filldir(direntry, ".", 1, file->f_pos, | 1000 | if (filldir(direntry, ".", 1, file->f_pos, |
1001 | file->f_dentry->d_inode->i_ino, DT_DIR) < 0) { | 1001 | file->f_path.dentry->d_inode->i_ino, DT_DIR) < 0) { |
1002 | cERROR(1, ("Filldir for current dir failed")); | 1002 | cERROR(1, ("Filldir for current dir failed")); |
1003 | rc = -ENOMEM; | 1003 | rc = -ENOMEM; |
1004 | break; | 1004 | break; |
@@ -1006,7 +1006,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir) | |||
1006 | file->f_pos++; | 1006 | file->f_pos++; |
1007 | case 1: | 1007 | case 1: |
1008 | if (filldir(direntry, "..", 2, file->f_pos, | 1008 | if (filldir(direntry, "..", 2, file->f_pos, |
1009 | file->f_dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { | 1009 | file->f_path.dentry->d_parent->d_inode->i_ino, DT_DIR) < 0) { |
1010 | cERROR(1, ("Filldir for parent dir failed")); | 1010 | cERROR(1, ("Filldir for parent dir failed")); |
1011 | rc = -ENOMEM; | 1011 | rc = -ENOMEM; |
1012 | break; | 1012 | break; |