This should hopefully fix the warnings reported.
[linux-2.6/linux-mips.git] / fs / tunnel.c
blob8fee49a00c71d2cb973c57b301de1808f254e584
1 /* fs/tunnel.c: utility functions to support VFS tunnelling
3 Copyright (C) 1999 Richard Gooch
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
15 You should have received a copy of the GNU Library General Public
16 License along with this library; if not, write to the Free
17 Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 Richard Gooch may be reached by email at rgooch@atnf.csiro.au
20 The postal address is:
21 Richard Gooch, c/o ATNF, P. O. Box 76, Epping, N.S.W., 2121, Australia.
23 ChangeLog
25 19991121 Richard Gooch <rgooch@atnf.csiro.au>
26 Created.
28 #include <linux/types.h>
29 #include <linux/errno.h>
30 #include <linux/ctype.h>
31 #include <linux/module.h>
32 #include <linux/fs.h>
35 /*PUBLIC_FUNCTION*/
36 struct dentry *vfs_tunnel_lookup (const struct dentry *dentry,
37 const struct dentry *parent,
38 const struct dentry *covered)
39 /* [SUMMARY] Lookup the corresponding dentry in the mounted-over FS.
40 <dentry> The dentry which is in the overmounting FS.
41 <parent> The parent of the dentry in the mounted-over FS. This may be NULL.
42 <covered> The dentry covered by the root dentry of the overmounting FS.
43 [RETURNS] A dentry on success, else NULL.
46 struct dentry *root = dentry->d_sb->s_root;
48 if (covered == root) return NULL;
49 if (parent) return lookup_dentry (dentry->d_name.name, parent, 0);
50 } /* End Function vfs_tunnel_lookup */