mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (23 commits) sanitize vfsmount refcounting changes fix old umount_tree() breakage autofs4: Merge the remaining dentry ops tables Unexport do_add_mount() and add in follow_automount(), not ->d_automount() Allow d_manage() to be used in RCU-walk mode Remove a further kludge from __do_follow_link() autofs4: Bump version autofs4: Add v4 pseudo direct mount support autofs4: Fix wait validation autofs4: Clean up autofs4_free_ino() autofs4: Clean up dentry operations autofs4: Clean up inode operations autofs4: Remove unused code autofs4: Add d_manage() dentry operation autofs4: Add d_automount() dentry operation Remove the automount through follow_link() kludge code from pathwalk CIFS: Use d_automount() rather than abusing follow_link() NFS: Use d_automount() rather than abusing follow_link() AFS: Use d_automount() rather than abusing follow_link() Add an AT_NO_AUTOMOUNT flag to suppress terminal automount ...
This commit is contained in:
commit
f8206b925f
40 changed files with 1009 additions and 854 deletions
|
|
@ -19,6 +19,8 @@ prototypes:
|
|||
void (*d_release)(struct dentry *);
|
||||
void (*d_iput)(struct dentry *, struct inode *);
|
||||
char *(*d_dname)((struct dentry *dentry, char *buffer, int buflen);
|
||||
struct vfsmount *(*d_automount)(struct path *path);
|
||||
int (*d_manage)(struct dentry *, bool);
|
||||
|
||||
locking rules:
|
||||
rename_lock ->d_lock may block rcu-walk
|
||||
|
|
@ -29,6 +31,8 @@ d_delete: no yes no no
|
|||
d_release: no no yes no
|
||||
d_iput: no no yes no
|
||||
d_dname: no no no no
|
||||
d_automount: no no yes no
|
||||
d_manage: no no yes (ref-walk) maybe
|
||||
|
||||
--------------------------- inode_operations ---------------------------
|
||||
prototypes:
|
||||
|
|
|
|||
|
|
@ -864,6 +864,8 @@ struct dentry_operations {
|
|||
void (*d_release)(struct dentry *);
|
||||
void (*d_iput)(struct dentry *, struct inode *);
|
||||
char *(*d_dname)(struct dentry *, char *, int);
|
||||
struct vfsmount *(*d_automount)(struct path *);
|
||||
int (*d_manage)(struct dentry *, bool, bool);
|
||||
};
|
||||
|
||||
d_revalidate: called when the VFS needs to revalidate a dentry. This
|
||||
|
|
@ -930,6 +932,47 @@ struct dentry_operations {
|
|||
at the end of the buffer, and returns a pointer to the first char.
|
||||
dynamic_dname() helper function is provided to take care of this.
|
||||
|
||||
d_automount: called when an automount dentry is to be traversed (optional).
|
||||
This should create a new VFS mount record and return the record to the
|
||||
caller. The caller is supplied with a path parameter giving the
|
||||
automount directory to describe the automount target and the parent
|
||||
VFS mount record to provide inheritable mount parameters. NULL should
|
||||
be returned if someone else managed to make the automount first. If
|
||||
the vfsmount creation failed, then an error code should be returned.
|
||||
If -EISDIR is returned, then the directory will be treated as an
|
||||
ordinary directory and returned to pathwalk to continue walking.
|
||||
|
||||
If a vfsmount is returned, the caller will attempt to mount it on the
|
||||
mountpoint and will remove the vfsmount from its expiration list in
|
||||
the case of failure. The vfsmount should be returned with 2 refs on
|
||||
it to prevent automatic expiration - the caller will clean up the
|
||||
additional ref.
|
||||
|
||||
This function is only used if DCACHE_NEED_AUTOMOUNT is set on the
|
||||
dentry. This is set by __d_instantiate() if S_AUTOMOUNT is set on the
|
||||
inode being added.
|
||||
|
||||
d_manage: called to allow the filesystem to manage the transition from a
|
||||
dentry (optional). This allows autofs, for example, to hold up clients
|
||||
waiting to explore behind a 'mountpoint' whilst letting the daemon go
|
||||
past and construct the subtree there. 0 should be returned to let the
|
||||
calling process continue. -EISDIR can be returned to tell pathwalk to
|
||||
use this directory as an ordinary directory and to ignore anything
|
||||
mounted on it and not to check the automount flag. Any other error
|
||||
code will abort pathwalk completely.
|
||||
|
||||
If the 'mounting_here' parameter is true, then namespace_sem is being
|
||||
held by the caller and the function should not initiate any mounts or
|
||||
unmounts that it will then wait for.
|
||||
|
||||
If the 'rcu_walk' parameter is true, then the caller is doing a
|
||||
pathwalk in RCU-walk mode. Sleeping is not permitted in this mode,
|
||||
and the caller can be asked to leave it and call again by returing
|
||||
-ECHILD.
|
||||
|
||||
This function is only used if DCACHE_MANAGE_TRANSIT is set on the
|
||||
dentry being transited from.
|
||||
|
||||
Example :
|
||||
|
||||
static char *pipefs_dname(struct dentry *dent, char *buffer, int buflen)
|
||||
|
|
|
|||
Loading…
Reference in a new issue