dir.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606
  1. /*
  2. * fs/cifs/dir.c
  3. *
  4. * vfs operations that deal with dentries
  5. *
  6. * Copyright (C) International Business Machines Corp., 2002,2007
  7. * Author(s): Steve French (sfrench@us.ibm.com)
  8. *
  9. * This library is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU Lesser General Public License as published
  11. * by the Free Software Foundation; either version 2.1 of the License, or
  12. * (at your option) any later version.
  13. *
  14. * This library is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See
  17. * the GNU Lesser General Public License for more details.
  18. *
  19. * You should have received a copy of the GNU Lesser General Public License
  20. * along with this library; if not, write to the Free Software
  21. * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
  22. */
  23. #include <linux/fs.h>
  24. #include <linux/stat.h>
  25. #include <linux/slab.h>
  26. #include <linux/namei.h>
  27. #include "cifsfs.h"
  28. #include "cifspdu.h"
  29. #include "cifsglob.h"
  30. #include "cifsproto.h"
  31. #include "cifs_debug.h"
  32. #include "cifs_fs_sb.h"
  33. static void
  34. renew_parental_timestamps(struct dentry *direntry)
  35. {
  36. /* BB check if there is a way to get the kernel to do this or if we
  37. really need this */
  38. do {
  39. direntry->d_time = jiffies;
  40. direntry = direntry->d_parent;
  41. } while (!IS_ROOT(direntry));
  42. }
  43. /* Note: caller must free return buffer */
  44. char *
  45. build_path_from_dentry(struct dentry *direntry)
  46. {
  47. struct dentry *temp;
  48. int namelen;
  49. int pplen;
  50. char *full_path;
  51. char dirsep;
  52. if (direntry == NULL)
  53. return NULL; /* not much we can do if dentry is freed and
  54. we need to reopen the file after it was closed implicitly
  55. when the server crashed */
  56. dirsep = CIFS_DIR_SEP(CIFS_SB(direntry->d_sb));
  57. pplen = CIFS_SB(direntry->d_sb)->prepathlen;
  58. cifs_bp_rename_retry:
  59. namelen = pplen;
  60. for (temp = direntry; !IS_ROOT(temp);) {
  61. namelen += (1 + temp->d_name.len);
  62. temp = temp->d_parent;
  63. if (temp == NULL) {
  64. cERROR(1, ("corrupt dentry"));
  65. return NULL;
  66. }
  67. }
  68. full_path = kmalloc(namelen+1, GFP_KERNEL);
  69. if (full_path == NULL)
  70. return full_path;
  71. full_path[namelen] = 0; /* trailing null */
  72. for (temp = direntry; !IS_ROOT(temp);) {
  73. namelen -= 1 + temp->d_name.len;
  74. if (namelen < 0) {
  75. break;
  76. } else {
  77. full_path[namelen] = dirsep;
  78. strncpy(full_path + namelen + 1, temp->d_name.name,
  79. temp->d_name.len);
  80. cFYI(0, ("name: %s", full_path + namelen));
  81. }
  82. temp = temp->d_parent;
  83. if (temp == NULL) {
  84. cERROR(1, ("corrupt dentry"));
  85. kfree(full_path);
  86. return NULL;
  87. }
  88. }
  89. if (namelen != pplen) {
  90. cERROR(1,
  91. ("did not end path lookup where expected namelen is %d",
  92. namelen));
  93. /* presumably this is only possible if racing with a rename
  94. of one of the parent directories (we can not lock the dentries
  95. above us to prevent this, but retrying should be harmless) */
  96. kfree(full_path);
  97. goto cifs_bp_rename_retry;
  98. }
  99. /* DIR_SEP already set for byte 0 / vs \ but not for
  100. subsequent slashes in prepath which currently must
  101. be entered the right way - not sure if there is an alternative
  102. since the '\' is a valid posix character so we can not switch
  103. those safely to '/' if any are found in the middle of the prepath */
  104. /* BB test paths to Windows with '/' in the midst of prepath */
  105. strncpy(full_path, CIFS_SB(direntry->d_sb)->prepath, pplen);
  106. return full_path;
  107. }
  108. /* char * build_wildcard_path_from_dentry(struct dentry *direntry)
  109. {
  110. if(full_path == NULL)
  111. return full_path;
  112. full_path[namelen] = '\\';
  113. full_path[namelen+1] = '*';
  114. full_path[namelen+2] = 0;
  115. BB remove above eight lines BB */
  116. /* Inode operations in similar order to how they appear in Linux file fs.h */
  117. int
  118. cifs_create(struct inode *inode, struct dentry *direntry, int mode,
  119. struct nameidata *nd)
  120. {
  121. int rc = -ENOENT;
  122. int xid;
  123. int oplock = 0;
  124. int desiredAccess = GENERIC_READ | GENERIC_WRITE;
  125. __u16 fileHandle;
  126. struct cifs_sb_info *cifs_sb;
  127. struct cifsTconInfo *pTcon;
  128. char *full_path = NULL;
  129. FILE_ALL_INFO *buf = NULL;
  130. struct inode *newinode = NULL;
  131. struct cifsFileInfo *pCifsFile = NULL;
  132. struct cifsInodeInfo *pCifsInode;
  133. int disposition = FILE_OVERWRITE_IF;
  134. int write_only = FALSE;
  135. xid = GetXid();
  136. cifs_sb = CIFS_SB(inode->i_sb);
  137. pTcon = cifs_sb->tcon;
  138. full_path = build_path_from_dentry(direntry);
  139. if (full_path == NULL) {
  140. FreeXid(xid);
  141. return -ENOMEM;
  142. }
  143. if (nd && (nd->flags & LOOKUP_OPEN)) {
  144. int oflags = nd->intent.open.flags;
  145. desiredAccess = 0;
  146. if (oflags & FMODE_READ)
  147. desiredAccess |= GENERIC_READ;
  148. if (oflags & FMODE_WRITE) {
  149. desiredAccess |= GENERIC_WRITE;
  150. if (!(oflags & FMODE_READ))
  151. write_only = TRUE;
  152. }
  153. if ((oflags & (O_CREAT | O_EXCL)) == (O_CREAT | O_EXCL))
  154. disposition = FILE_CREATE;
  155. else if ((oflags & (O_CREAT | O_TRUNC)) == (O_CREAT | O_TRUNC))
  156. disposition = FILE_OVERWRITE_IF;
  157. else if ((oflags & O_CREAT) == O_CREAT)
  158. disposition = FILE_OPEN_IF;
  159. else {
  160. cFYI(1, ("Create flag not set in create function"));
  161. }
  162. }
  163. /* BB add processing to set equivalent of mode - e.g. via CreateX with
  164. ACLs */
  165. if (oplockEnabled)
  166. oplock = REQ_OPLOCK;
  167. buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
  168. if (buf == NULL) {
  169. kfree(full_path);
  170. FreeXid(xid);
  171. return -ENOMEM;
  172. }
  173. if (cifs_sb->tcon->ses->capabilities & CAP_NT_SMBS)
  174. rc = CIFSSMBOpen(xid, pTcon, full_path, disposition,
  175. desiredAccess, CREATE_NOT_DIR,
  176. &fileHandle, &oplock, buf, cifs_sb->local_nls,
  177. cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
  178. else
  179. rc = -EIO; /* no NT SMB support fall into legacy open below */
  180. if (rc == -EIO) {
  181. /* old server, retry the open legacy style */
  182. rc = SMBLegacyOpen(xid, pTcon, full_path, disposition,
  183. desiredAccess, CREATE_NOT_DIR,
  184. &fileHandle, &oplock, buf, cifs_sb->local_nls,
  185. cifs_sb->mnt_cifs_flags & CIFS_MOUNT_MAP_SPECIAL_CHR);
  186. }
  187. if (rc) {
  188. cFYI(1, ("cifs_create returned 0x%x", rc));
  189. } else {
  190. /* If Open reported that we actually created a file
  191. then we now have to set the mode if possible */
  192. if ((pTcon->unix_ext) && (oplock & CIFS_CREATE_ACTION)) {
  193. mode &= ~current->fs->umask;
  194. if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
  195. CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
  196. (__u64)current->fsuid,
  197. (__u64)current->fsgid,
  198. 0 /* dev */,
  199. cifs_sb->local_nls,
  200. cifs_sb->mnt_cifs_flags &
  201. CIFS_MOUNT_MAP_SPECIAL_CHR);
  202. } else {
  203. CIFSSMBUnixSetPerms(xid, pTcon, full_path, mode,
  204. (__u64)-1,
  205. (__u64)-1,
  206. 0 /* dev */,
  207. cifs_sb->local_nls,
  208. cifs_sb->mnt_cifs_flags &
  209. CIFS_MOUNT_MAP_SPECIAL_CHR);
  210. }
  211. } else {
  212. /* BB implement mode setting via Windows security
  213. descriptors e.g. */
  214. /* CIFSSMBWinSetPerms(xid,pTcon,path,mode,-1,-1,nls);*/
  215. /* Could set r/o dos attribute if mode & 0222 == 0 */
  216. }
  217. /* server might mask mode so we have to query for it */
  218. if (pTcon->unix_ext)
  219. rc = cifs_get_inode_info_unix(&newinode, full_path,
  220. inode->i_sb, xid);
  221. else {
  222. rc = cifs_get_inode_info(&newinode, full_path,
  223. buf, inode->i_sb, xid);
  224. if (newinode) {
  225. newinode->i_mode = mode;
  226. if ((oplock & CIFS_CREATE_ACTION) &&
  227. (cifs_sb->mnt_cifs_flags &
  228. CIFS_MOUNT_SET_UID)) {
  229. newinode->i_uid = current->fsuid;
  230. newinode->i_gid = current->fsgid;
  231. }
  232. }
  233. }
  234. if (rc != 0) {
  235. cFYI(1,
  236. ("Create worked but get_inode_info failed rc = %d",
  237. rc));
  238. } else {
  239. if (pTcon->nocase)
  240. direntry->d_op = &cifs_ci_dentry_ops;
  241. else
  242. direntry->d_op = &cifs_dentry_ops;
  243. d_instantiate(direntry, newinode);
  244. }
  245. if ((nd == NULL /* nfsd case - nfs srv does not set nd */) ||
  246. ((nd->flags & LOOKUP_OPEN) == FALSE)) {
  247. /* mknod case - do not leave file open */
  248. CIFSSMBClose(xid, pTcon, fileHandle);
  249. } else if (newinode) {
  250. pCifsFile =
  251. kzalloc(sizeof(struct cifsFileInfo), GFP_KERNEL);
  252. if (pCifsFile == NULL)
  253. goto cifs_create_out;
  254. pCifsFile->netfid = fileHandle;
  255. pCifsFile->pid = current->tgid;
  256. pCifsFile->pInode = newinode;
  257. pCifsFile->invalidHandle = FALSE;
  258. pCifsFile->closePend = FALSE;
  259. init_MUTEX(&pCifsFile->fh_sem);
  260. mutex_init(&pCifsFile->lock_mutex);
  261. INIT_LIST_HEAD(&pCifsFile->llist);
  262. atomic_set(&pCifsFile->wrtPending, 0);
  263. /* set the following in open now
  264. pCifsFile->pfile = file; */
  265. write_lock(&GlobalSMBSeslock);
  266. list_add(&pCifsFile->tlist, &pTcon->openFileList);
  267. pCifsInode = CIFS_I(newinode);
  268. if (pCifsInode) {
  269. /* if readable file instance put first in list*/
  270. if (write_only == TRUE) {
  271. list_add_tail(&pCifsFile->flist,
  272. &pCifsInode->openFileList);
  273. } else {
  274. list_add(&pCifsFile->flist,
  275. &pCifsInode->openFileList);
  276. }
  277. if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
  278. pCifsInode->clientCanCacheAll = TRUE;
  279. pCifsInode->clientCanCacheRead = TRUE;
  280. cFYI(1, ("Exclusive Oplock inode %p",
  281. newinode));
  282. } else if ((oplock & 0xF) == OPLOCK_READ)
  283. pCifsInode->clientCanCacheRead = TRUE;
  284. }
  285. write_unlock(&GlobalSMBSeslock);
  286. }
  287. }
  288. cifs_create_out:
  289. kfree(buf);
  290. kfree(full_path);
  291. FreeXid(xid);
  292. return rc;
  293. }
  294. int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
  295. dev_t device_number)
  296. {
  297. int rc = -EPERM;
  298. int xid;
  299. struct cifs_sb_info *cifs_sb;
  300. struct cifsTconInfo *pTcon;
  301. char *full_path = NULL;
  302. struct inode *newinode = NULL;
  303. if (!old_valid_dev(device_number))
  304. return -EINVAL;
  305. xid = GetXid();
  306. cifs_sb = CIFS_SB(inode->i_sb);
  307. pTcon = cifs_sb->tcon;
  308. full_path = build_path_from_dentry(direntry);
  309. if (full_path == NULL)
  310. rc = -ENOMEM;
  311. else if (pTcon->unix_ext) {
  312. mode &= ~current->fs->umask;
  313. if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
  314. rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path,
  315. mode, (__u64)current->fsuid,
  316. (__u64)current->fsgid,
  317. device_number, cifs_sb->local_nls,
  318. cifs_sb->mnt_cifs_flags &
  319. CIFS_MOUNT_MAP_SPECIAL_CHR);
  320. } else {
  321. rc = CIFSSMBUnixSetPerms(xid, pTcon,
  322. full_path, mode, (__u64)-1, (__u64)-1,
  323. device_number, cifs_sb->local_nls,
  324. cifs_sb->mnt_cifs_flags &
  325. CIFS_MOUNT_MAP_SPECIAL_CHR);
  326. }
  327. if (!rc) {
  328. rc = cifs_get_inode_info_unix(&newinode, full_path,
  329. inode->i_sb, xid);
  330. if (pTcon->nocase)
  331. direntry->d_op = &cifs_ci_dentry_ops;
  332. else
  333. direntry->d_op = &cifs_dentry_ops;
  334. if (rc == 0)
  335. d_instantiate(direntry, newinode);
  336. }
  337. } else {
  338. if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
  339. int oplock = 0;
  340. u16 fileHandle;
  341. FILE_ALL_INFO * buf;
  342. cFYI(1, ("sfu compat create special file"));
  343. buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
  344. if (buf == NULL) {
  345. kfree(full_path);
  346. FreeXid(xid);
  347. return -ENOMEM;
  348. }
  349. rc = CIFSSMBOpen(xid, pTcon, full_path,
  350. FILE_CREATE, /* fail if exists */
  351. GENERIC_WRITE /* BB would
  352. WRITE_OWNER | WRITE_DAC be better? */,
  353. /* Create a file and set the
  354. file attribute to SYSTEM */
  355. CREATE_NOT_DIR | CREATE_OPTION_SPECIAL,
  356. &fileHandle, &oplock, buf,
  357. cifs_sb->local_nls,
  358. cifs_sb->mnt_cifs_flags &
  359. CIFS_MOUNT_MAP_SPECIAL_CHR);
  360. /* BB FIXME - add handling for backlevel servers
  361. which need legacy open and check for all
  362. calls to SMBOpen for fallback to SMBLeagcyOpen */
  363. if (!rc) {
  364. /* BB Do not bother to decode buf since no
  365. local inode yet to put timestamps in,
  366. but we can reuse it safely */
  367. unsigned int bytes_written;
  368. struct win_dev *pdev;
  369. pdev = (struct win_dev *)buf;
  370. if (S_ISCHR(mode)) {
  371. memcpy(pdev->type, "IntxCHR", 8);
  372. pdev->major =
  373. cpu_to_le64(MAJOR(device_number));
  374. pdev->minor =
  375. cpu_to_le64(MINOR(device_number));
  376. rc = CIFSSMBWrite(xid, pTcon,
  377. fileHandle,
  378. sizeof(struct win_dev),
  379. 0, &bytes_written, (char *)pdev,
  380. NULL, 0);
  381. } else if (S_ISBLK(mode)) {
  382. memcpy(pdev->type, "IntxBLK", 8);
  383. pdev->major =
  384. cpu_to_le64(MAJOR(device_number));
  385. pdev->minor =
  386. cpu_to_le64(MINOR(device_number));
  387. rc = CIFSSMBWrite(xid, pTcon,
  388. fileHandle,
  389. sizeof(struct win_dev),
  390. 0, &bytes_written, (char *)pdev,
  391. NULL, 0);
  392. } /* else if(S_ISFIFO */
  393. CIFSSMBClose(xid, pTcon, fileHandle);
  394. d_drop(direntry);
  395. }
  396. kfree(buf);
  397. /* add code here to set EAs */
  398. }
  399. }
  400. kfree(full_path);
  401. FreeXid(xid);
  402. return rc;
  403. }
  404. struct dentry *
  405. cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
  406. struct nameidata *nd)
  407. {
  408. int xid;
  409. int rc = 0; /* to get around spurious gcc warning, set to zero here */
  410. struct cifs_sb_info *cifs_sb;
  411. struct cifsTconInfo *pTcon;
  412. struct inode *newInode = NULL;
  413. char *full_path = NULL;
  414. xid = GetXid();
  415. cFYI(1, (" parent inode = 0x%p name is: %s and dentry = 0x%p",
  416. parent_dir_inode, direntry->d_name.name, direntry));
  417. /* check whether path exists */
  418. cifs_sb = CIFS_SB(parent_dir_inode->i_sb);
  419. pTcon = cifs_sb->tcon;
  420. /*
  421. * Don't allow the separator character in a path component.
  422. * The VFS will not allow "/", but "\" is allowed by posix.
  423. */
  424. if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
  425. int i;
  426. for (i = 0; i < direntry->d_name.len; i++)
  427. if (direntry->d_name.name[i] == '\\') {
  428. cFYI(1, ("Invalid file name"));
  429. FreeXid(xid);
  430. return ERR_PTR(-EINVAL);
  431. }
  432. }
  433. /* can not grab the rename sem here since it would
  434. deadlock in the cases (beginning of sys_rename itself)
  435. in which we already have the sb rename sem */
  436. full_path = build_path_from_dentry(direntry);
  437. if (full_path == NULL) {
  438. FreeXid(xid);
  439. return ERR_PTR(-ENOMEM);
  440. }
  441. if (direntry->d_inode != NULL) {
  442. cFYI(1, (" non-NULL inode in lookup"));
  443. } else {
  444. cFYI(1, (" NULL inode in lookup"));
  445. }
  446. cFYI(1,
  447. (" Full path: %s inode = 0x%p", full_path, direntry->d_inode));
  448. if (pTcon->unix_ext)
  449. rc = cifs_get_inode_info_unix(&newInode, full_path,
  450. parent_dir_inode->i_sb, xid);
  451. else
  452. rc = cifs_get_inode_info(&newInode, full_path, NULL,
  453. parent_dir_inode->i_sb, xid);
  454. if ((rc == 0) && (newInode != NULL)) {
  455. if (pTcon->nocase)
  456. direntry->d_op = &cifs_ci_dentry_ops;
  457. else
  458. direntry->d_op = &cifs_dentry_ops;
  459. d_add(direntry, newInode);
  460. /* since paths are not looked up by component - the parent
  461. directories are presumed to be good here */
  462. renew_parental_timestamps(direntry);
  463. } else if (rc == -ENOENT) {
  464. rc = 0;
  465. direntry->d_time = jiffies;
  466. if (pTcon->nocase)
  467. direntry->d_op = &cifs_ci_dentry_ops;
  468. else
  469. direntry->d_op = &cifs_dentry_ops;
  470. d_add(direntry, NULL);
  471. /* if it was once a directory (but how can we tell?) we could do
  472. shrink_dcache_parent(direntry); */
  473. } else {
  474. cERROR(1, ("Error 0x%x on cifs_get_inode_info in lookup of %s",
  475. rc, full_path));
  476. /* BB special case check for Access Denied - watch security
  477. exposure of returning dir info implicitly via different rc
  478. if file exists or not but no access BB */
  479. }
  480. kfree(full_path);
  481. FreeXid(xid);
  482. return ERR_PTR(rc);
  483. }
  484. static int
  485. cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
  486. {
  487. int isValid = 1;
  488. if (direntry->d_inode) {
  489. if (cifs_revalidate(direntry)) {
  490. return 0;
  491. }
  492. } else {
  493. cFYI(1, ("neg dentry 0x%p name = %s",
  494. direntry, direntry->d_name.name));
  495. if (time_after(jiffies, direntry->d_time + HZ) ||
  496. !lookupCacheEnabled) {
  497. d_drop(direntry);
  498. isValid = 0;
  499. }
  500. }
  501. return isValid;
  502. }
  503. /* static int cifs_d_delete(struct dentry *direntry)
  504. {
  505. int rc = 0;
  506. cFYI(1, ("In cifs d_delete, name = %s", direntry->d_name.name));
  507. return rc;
  508. } */
  509. struct dentry_operations cifs_dentry_ops = {
  510. .d_revalidate = cifs_d_revalidate,
  511. /* d_delete: cifs_d_delete, */ /* not needed except for debugging */
  512. };
  513. static int cifs_ci_hash(struct dentry *dentry, struct qstr *q)
  514. {
  515. struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
  516. unsigned long hash;
  517. int i;
  518. hash = init_name_hash();
  519. for (i = 0; i < q->len; i++)
  520. hash = partial_name_hash(nls_tolower(codepage, q->name[i]),
  521. hash);
  522. q->hash = end_name_hash(hash);
  523. return 0;
  524. }
  525. static int cifs_ci_compare(struct dentry *dentry, struct qstr *a,
  526. struct qstr *b)
  527. {
  528. struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
  529. if ((a->len == b->len) &&
  530. (nls_strnicmp(codepage, a->name, b->name, a->len) == 0)) {
  531. /*
  532. * To preserve case, don't let an existing negative dentry's
  533. * case take precedence. If a is not a negative dentry, this
  534. * should have no side effects
  535. */
  536. memcpy(a->name, b->name, a->len);
  537. return 0;
  538. }
  539. return 1;
  540. }
  541. struct dentry_operations cifs_ci_dentry_ops = {
  542. .d_revalidate = cifs_d_revalidate,
  543. .d_hash = cifs_ci_hash,
  544. .d_compare = cifs_ci_compare,
  545. };