dir.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605
  1. /*
  2. * fs/cifs/dir.c
  3. *
  4. * vfs operations that deal with dentries
  5. *
  6. * Copyright (C) International Business Machines Corp., 2002,2005
  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 ((cifs_sb->tcon->ses->capabilities & CAP_UNIX) &&
  193. (oplock & CIFS_CREATE_ACTION))
  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. /* BB server might mask mode so we have to query for Unix case*/
  218. if (pTcon->ses->capabilities & CAP_UNIX)
  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->flags & LOOKUP_OPEN) == FALSE) {
  246. /* mknod case - do not leave file open */
  247. CIFSSMBClose(xid, pTcon, fileHandle);
  248. } else if (newinode) {
  249. pCifsFile =
  250. kzalloc(sizeof (struct cifsFileInfo), GFP_KERNEL);
  251. if (pCifsFile == NULL)
  252. goto cifs_create_out;
  253. pCifsFile->netfid = fileHandle;
  254. pCifsFile->pid = current->tgid;
  255. pCifsFile->pInode = newinode;
  256. pCifsFile->invalidHandle = FALSE;
  257. pCifsFile->closePend = FALSE;
  258. init_MUTEX(&pCifsFile->fh_sem);
  259. mutex_init(&pCifsFile->lock_mutex);
  260. INIT_LIST_HEAD(&pCifsFile->llist);
  261. atomic_set(&pCifsFile->wrtPending, 0);
  262. /* set the following in open now
  263. pCifsFile->pfile = file; */
  264. write_lock(&GlobalSMBSeslock);
  265. list_add(&pCifsFile->tlist, &pTcon->openFileList);
  266. pCifsInode = CIFS_I(newinode);
  267. if (pCifsInode) {
  268. /* if readable file instance put first in list*/
  269. if (write_only == TRUE) {
  270. list_add_tail(&pCifsFile->flist,
  271. &pCifsInode->openFileList);
  272. } else {
  273. list_add(&pCifsFile->flist,
  274. &pCifsInode->openFileList);
  275. }
  276. if ((oplock & 0xF) == OPLOCK_EXCLUSIVE) {
  277. pCifsInode->clientCanCacheAll = TRUE;
  278. pCifsInode->clientCanCacheRead = TRUE;
  279. cFYI(1,("Exclusive Oplock for inode %p",
  280. newinode));
  281. } else if ((oplock & 0xF) == OPLOCK_READ)
  282. pCifsInode->clientCanCacheRead = TRUE;
  283. }
  284. write_unlock(&GlobalSMBSeslock);
  285. }
  286. }
  287. cifs_create_out:
  288. kfree(buf);
  289. kfree(full_path);
  290. FreeXid(xid);
  291. return rc;
  292. }
  293. int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode,
  294. dev_t device_number)
  295. {
  296. int rc = -EPERM;
  297. int xid;
  298. struct cifs_sb_info *cifs_sb;
  299. struct cifsTconInfo *pTcon;
  300. char *full_path = NULL;
  301. struct inode * newinode = NULL;
  302. if (!old_valid_dev(device_number))
  303. return -EINVAL;
  304. xid = GetXid();
  305. cifs_sb = CIFS_SB(inode->i_sb);
  306. pTcon = cifs_sb->tcon;
  307. full_path = build_path_from_dentry(direntry);
  308. if (full_path == NULL)
  309. rc = -ENOMEM;
  310. else if (pTcon->ses->capabilities & CAP_UNIX) {
  311. if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_SET_UID) {
  312. rc = CIFSSMBUnixSetPerms(xid, pTcon, full_path,
  313. mode, (__u64)current->fsuid,
  314. (__u64)current->fsgid,
  315. device_number, cifs_sb->local_nls,
  316. cifs_sb->mnt_cifs_flags &
  317. CIFS_MOUNT_MAP_SPECIAL_CHR);
  318. } else {
  319. rc = CIFSSMBUnixSetPerms(xid, pTcon,
  320. full_path, mode, (__u64)-1, (__u64)-1,
  321. device_number, cifs_sb->local_nls,
  322. cifs_sb->mnt_cifs_flags &
  323. CIFS_MOUNT_MAP_SPECIAL_CHR);
  324. }
  325. if (!rc) {
  326. rc = cifs_get_inode_info_unix(&newinode, full_path,
  327. inode->i_sb, xid);
  328. if (pTcon->nocase)
  329. direntry->d_op = &cifs_ci_dentry_ops;
  330. else
  331. direntry->d_op = &cifs_dentry_ops;
  332. if (rc == 0)
  333. d_instantiate(direntry, newinode);
  334. }
  335. } else {
  336. if (cifs_sb->mnt_cifs_flags & CIFS_MOUNT_UNX_EMUL) {
  337. int oplock = 0;
  338. u16 fileHandle;
  339. FILE_ALL_INFO * buf;
  340. cFYI(1, ("sfu compat create special file"));
  341. buf = kmalloc(sizeof(FILE_ALL_INFO), GFP_KERNEL);
  342. if (buf == NULL) {
  343. kfree(full_path);
  344. FreeXid(xid);
  345. return -ENOMEM;
  346. }
  347. rc = CIFSSMBOpen(xid, pTcon, full_path,
  348. FILE_CREATE, /* fail if exists */
  349. GENERIC_WRITE /* BB would
  350. WRITE_OWNER | WRITE_DAC be better? */,
  351. /* Create a file and set the
  352. file attribute to SYSTEM */
  353. CREATE_NOT_DIR | CREATE_OPTION_SPECIAL,
  354. &fileHandle, &oplock, buf,
  355. cifs_sb->local_nls,
  356. cifs_sb->mnt_cifs_flags &
  357. CIFS_MOUNT_MAP_SPECIAL_CHR);
  358. /* BB FIXME - add handling for backlevel servers
  359. which need legacy open and check for all
  360. calls to SMBOpen for fallback to SMBLeagcyOpen */
  361. if (!rc) {
  362. /* BB Do not bother to decode buf since no
  363. local inode yet to put timestamps in,
  364. but we can reuse it safely */
  365. int bytes_written;
  366. struct win_dev *pdev;
  367. pdev = (struct win_dev *)buf;
  368. if (S_ISCHR(mode)) {
  369. memcpy(pdev->type, "IntxCHR", 8);
  370. pdev->major =
  371. cpu_to_le64(MAJOR(device_number));
  372. pdev->minor =
  373. cpu_to_le64(MINOR(device_number));
  374. rc = CIFSSMBWrite(xid, pTcon,
  375. fileHandle,
  376. sizeof(struct win_dev),
  377. 0, &bytes_written, (char *)pdev,
  378. NULL, 0);
  379. } else if (S_ISBLK(mode)) {
  380. memcpy(pdev->type, "IntxBLK", 8);
  381. pdev->major =
  382. cpu_to_le64(MAJOR(device_number));
  383. pdev->minor =
  384. cpu_to_le64(MINOR(device_number));
  385. rc = CIFSSMBWrite(xid, pTcon,
  386. fileHandle,
  387. sizeof(struct win_dev),
  388. 0, &bytes_written, (char *)pdev,
  389. NULL, 0);
  390. } /* else if(S_ISFIFO */
  391. CIFSSMBClose(xid, pTcon, fileHandle);
  392. d_drop(direntry);
  393. }
  394. kfree(buf);
  395. /* add code here to set EAs */
  396. }
  397. }
  398. kfree(full_path);
  399. FreeXid(xid);
  400. return rc;
  401. }
  402. struct dentry *
  403. cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
  404. struct nameidata *nd)
  405. {
  406. int xid;
  407. int rc = 0; /* to get around spurious gcc warning, set to zero here */
  408. struct cifs_sb_info *cifs_sb;
  409. struct cifsTconInfo *pTcon;
  410. struct inode *newInode = NULL;
  411. char *full_path = NULL;
  412. xid = GetXid();
  413. cFYI(1,
  414. (" parent inode = 0x%p name is: %s and dentry = 0x%p",
  415. parent_dir_inode, direntry->d_name.name, direntry));
  416. /* check whether path exists */
  417. cifs_sb = CIFS_SB(parent_dir_inode->i_sb);
  418. pTcon = cifs_sb->tcon;
  419. /*
  420. * Don't allow the separator character in a path component.
  421. * The VFS will not allow "/", but "\" is allowed by posix.
  422. */
  423. if (!(cifs_sb->mnt_cifs_flags & CIFS_MOUNT_POSIX_PATHS)) {
  424. int i;
  425. for (i = 0; i < direntry->d_name.len; i++)
  426. if (direntry->d_name.name[i] == '\\') {
  427. cFYI(1, ("Invalid file name"));
  428. FreeXid(xid);
  429. return ERR_PTR(-EINVAL);
  430. }
  431. }
  432. /* can not grab the rename sem here since it would
  433. deadlock in the cases (beginning of sys_rename itself)
  434. in which we already have the sb rename sem */
  435. full_path = build_path_from_dentry(direntry);
  436. if (full_path == NULL) {
  437. FreeXid(xid);
  438. return ERR_PTR(-ENOMEM);
  439. }
  440. if (direntry->d_inode != NULL) {
  441. cFYI(1, (" non-NULL inode in lookup"));
  442. } else {
  443. cFYI(1, (" NULL inode in lookup"));
  444. }
  445. cFYI(1,
  446. (" Full path: %s inode = 0x%p", full_path, direntry->d_inode));
  447. if (pTcon->ses->capabilities & CAP_UNIX)
  448. rc = cifs_get_inode_info_unix(&newInode, full_path,
  449. parent_dir_inode->i_sb, xid);
  450. else
  451. rc = cifs_get_inode_info(&newInode, full_path, NULL,
  452. parent_dir_inode->i_sb, xid);
  453. if ((rc == 0) && (newInode != NULL)) {
  454. if (pTcon->nocase)
  455. direntry->d_op = &cifs_ci_dentry_ops;
  456. else
  457. direntry->d_op = &cifs_dentry_ops;
  458. d_add(direntry, newInode);
  459. /* since paths are not looked up by component - the parent
  460. directories are presumed to be good here */
  461. renew_parental_timestamps(direntry);
  462. } else if (rc == -ENOENT) {
  463. rc = 0;
  464. direntry->d_time = jiffies;
  465. if (pTcon->nocase)
  466. direntry->d_op = &cifs_ci_dentry_ops;
  467. else
  468. direntry->d_op = &cifs_dentry_ops;
  469. d_add(direntry, NULL);
  470. /* if it was once a directory (but how can we tell?) we could do
  471. shrink_dcache_parent(direntry); */
  472. } else {
  473. cERROR(1,("Error 0x%x on cifs_get_inode_info in lookup of %s",
  474. rc, full_path));
  475. /* BB special case check for Access Denied - watch security
  476. exposure of returning dir info implicitly via different rc
  477. if file exists or not but no access BB */
  478. }
  479. kfree(full_path);
  480. FreeXid(xid);
  481. return ERR_PTR(rc);
  482. }
  483. static int
  484. cifs_d_revalidate(struct dentry *direntry, struct nameidata *nd)
  485. {
  486. int isValid = 1;
  487. if (direntry->d_inode) {
  488. if (cifs_revalidate(direntry)) {
  489. return 0;
  490. }
  491. } else {
  492. cFYI(1, ("neg dentry 0x%p name = %s",
  493. direntry, direntry->d_name.name));
  494. if (time_after(jiffies, direntry->d_time + HZ) ||
  495. !lookupCacheEnabled) {
  496. d_drop(direntry);
  497. isValid = 0;
  498. }
  499. }
  500. return isValid;
  501. }
  502. /* static int cifs_d_delete(struct dentry *direntry)
  503. {
  504. int rc = 0;
  505. cFYI(1, ("In cifs d_delete, name = %s", direntry->d_name.name));
  506. return rc;
  507. } */
  508. struct dentry_operations cifs_dentry_ops = {
  509. .d_revalidate = cifs_d_revalidate,
  510. /* d_delete: cifs_d_delete, */ /* not needed except for debugging */
  511. };
  512. static int cifs_ci_hash(struct dentry *dentry, struct qstr *q)
  513. {
  514. struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
  515. unsigned long hash;
  516. int i;
  517. hash = init_name_hash();
  518. for (i = 0; i < q->len; i++)
  519. hash = partial_name_hash(nls_tolower(codepage, q->name[i]),
  520. hash);
  521. q->hash = end_name_hash(hash);
  522. return 0;
  523. }
  524. static int cifs_ci_compare(struct dentry *dentry, struct qstr *a,
  525. struct qstr *b)
  526. {
  527. struct nls_table *codepage = CIFS_SB(dentry->d_inode->i_sb)->local_nls;
  528. if ((a->len == b->len) &&
  529. (nls_strnicmp(codepage, a->name, b->name, a->len) == 0)) {
  530. /*
  531. * To preserve case, don't let an existing negative dentry's
  532. * case take precedence. If a is not a negative dentry, this
  533. * should have no side effects
  534. */
  535. memcpy((unsigned char *)a->name, b->name, a->len);
  536. return 0;
  537. }
  538. return 1;
  539. }
  540. struct dentry_operations cifs_ci_dentry_ops = {
  541. .d_revalidate = cifs_d_revalidate,
  542. .d_hash = cifs_ci_hash,
  543. .d_compare = cifs_ci_compare,
  544. };