Commit 2d9a3b29 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] autofs4: printk cleanup

From: Ian Kent <raven@themaw.net>

This is a patch contributed by Joe Perches to automatically include the
function name in the dprintk statements.
parent a7250728
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
/* #define DEBUG */ /* #define DEBUG */
#ifdef DEBUG #ifdef DEBUG
#define DPRINTK(D) do{ printk("pid %d: ", current->pid); printk D; } while(0) #define DPRINTK(fmt,args...) do { printk(KERN_DEBUG "pid %d: %s: " fmt "\n" , current->pid , __FUNCTION__ , ##args); } while(0)
#else #else
#define DPRINTK(D) do {} while(0) #define DPRINTK(fmt,args...) do {} while(0)
#endif #endif
#define AUTOFS_SUPER_MAGIC 0x0187 #define AUTOFS_SUPER_MAGIC 0x0187
......
...@@ -50,8 +50,8 @@ static int autofs4_check_mount(struct vfsmount *mnt, struct dentry *dentry) ...@@ -50,8 +50,8 @@ static int autofs4_check_mount(struct vfsmount *mnt, struct dentry *dentry)
{ {
int status = 0; int status = 0;
DPRINTK(("autofs4_check_mount: dentry %p %.*s\n", DPRINTK("dentry %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name)); dentry, (int)dentry->d_name.len, dentry->d_name.name);
mntget(mnt); mntget(mnt);
dget(dentry); dget(dentry);
...@@ -70,7 +70,7 @@ static int autofs4_check_mount(struct vfsmount *mnt, struct dentry *dentry) ...@@ -70,7 +70,7 @@ static int autofs4_check_mount(struct vfsmount *mnt, struct dentry *dentry)
if (may_umount_tree(mnt) == 0) if (may_umount_tree(mnt) == 0)
status = 1; status = 1;
done: done:
DPRINTK(("autofs4_check_mount: returning = %d\n", status)); DPRINTK("returning = %d", status);
mntput(mnt); mntput(mnt);
dput(dentry); dput(dentry);
return status; return status;
...@@ -88,8 +88,8 @@ static int autofs4_check_tree(struct vfsmount *mnt, ...@@ -88,8 +88,8 @@ static int autofs4_check_tree(struct vfsmount *mnt,
struct dentry *this_parent = top; struct dentry *this_parent = top;
struct list_head *next; struct list_head *next;
DPRINTK(("autofs4_check_tree: parent %p %.*s\n", DPRINTK("parent %p %.*s",
top, (int)top->d_name.len, top->d_name.name)); top, (int)top->d_name.len, top->d_name.name);
/* Negative dentry - give up */ /* Negative dentry - give up */
if (!simple_positive(top)) if (!simple_positive(top))
...@@ -112,8 +112,8 @@ static int autofs4_check_tree(struct vfsmount *mnt, ...@@ -112,8 +112,8 @@ static int autofs4_check_tree(struct vfsmount *mnt,
continue; continue;
} }
DPRINTK(("autofs4_check_tree: dentry %p %.*s\n", DPRINTK("dentry %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name)); dentry, (int)dentry->d_name.len, dentry->d_name.name);
if (!simple_empty_nolock(dentry)) { if (!simple_empty_nolock(dentry)) {
this_parent = dentry; this_parent = dentry;
...@@ -154,8 +154,8 @@ struct dentry *autofs4_check_leaves(struct vfsmount *mnt, ...@@ -154,8 +154,8 @@ struct dentry *autofs4_check_leaves(struct vfsmount *mnt,
struct dentry *this_parent = parent; struct dentry *this_parent = parent;
struct list_head *next; struct list_head *next;
DPRINTK(("autofs4_check_leaves: parent %p %.*s\n", DPRINTK("parent %p %.*s",
parent, (int)parent->d_name.len, parent->d_name.name)); parent, (int)parent->d_name.len, parent->d_name.name);
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
repeat: repeat:
...@@ -170,8 +170,8 @@ struct dentry *autofs4_check_leaves(struct vfsmount *mnt, ...@@ -170,8 +170,8 @@ struct dentry *autofs4_check_leaves(struct vfsmount *mnt,
continue; continue;
} }
DPRINTK(("autofs4_check_leaves: dentry %p %.*s\n", DPRINTK("dentry %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name)); dentry, (int)dentry->d_name.len, dentry->d_name.name);
if (!list_empty(&dentry->d_subdirs)) { if (!list_empty(&dentry->d_subdirs)) {
this_parent = dentry; this_parent = dentry;
...@@ -250,8 +250,8 @@ static struct dentry *autofs4_expire(struct super_block *sb, ...@@ -250,8 +250,8 @@ static struct dentry *autofs4_expire(struct super_block *sb,
/* Case 1: indirect mount or top level direct mount */ /* Case 1: indirect mount or top level direct mount */
if (d_mountpoint(dentry)) { if (d_mountpoint(dentry)) {
DPRINTK(("autofs4_expire: checking mountpoint %p %.*s\n", DPRINTK("checking mountpoint %p %.*s",
dentry, (int)dentry->d_name.len, dentry->d_name.name)); dentry, (int)dentry->d_name.len, dentry->d_name.name);
/* Can we expire this guy */ /* Can we expire this guy */
if (!autofs4_can_expire(dentry, timeout, do_now)) if (!autofs4_can_expire(dentry, timeout, do_now))
...@@ -289,8 +289,8 @@ static struct dentry *autofs4_expire(struct super_block *sb, ...@@ -289,8 +289,8 @@ static struct dentry *autofs4_expire(struct super_block *sb,
} }
if ( expired ) { if ( expired ) {
DPRINTK(("autofs4_expire: returning %p %.*s\n", DPRINTK("returning %p %.*s",
expired, (int)expired->d_name.len, expired->d_name.name)); expired, (int)expired->d_name.len, expired->d_name.name);
spin_lock(&dcache_lock); spin_lock(&dcache_lock);
list_del(&expired->d_parent->d_subdirs); list_del(&expired->d_parent->d_subdirs);
list_add(&expired->d_parent->d_subdirs, &expired->d_child); list_add(&expired->d_parent->d_subdirs, &expired->d_child);
......
...@@ -87,7 +87,7 @@ static void autofs4_put_super(struct super_block *sb) ...@@ -87,7 +87,7 @@ static void autofs4_put_super(struct super_block *sb)
kfree(sbi); kfree(sbi);
DPRINTK(("autofs: shutting down\n")); DPRINTK("shutting down");
} }
static struct super_operations autofs4_sops = { static struct super_operations autofs4_sops = {
...@@ -193,7 +193,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -193,7 +193,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
sbi = (struct autofs_sb_info *) kmalloc(sizeof(*sbi), GFP_KERNEL); sbi = (struct autofs_sb_info *) kmalloc(sizeof(*sbi), GFP_KERNEL);
if ( !sbi ) if ( !sbi )
goto fail_unlock; goto fail_unlock;
DPRINTK(("autofs: starting up, sbi = %p\n",sbi)); DPRINTK("starting up, sbi = %p",sbi);
memset(sbi, 0, sizeof(*sbi)); memset(sbi, 0, sizeof(*sbi));
...@@ -253,7 +253,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent) ...@@ -253,7 +253,7 @@ int autofs4_fill_super(struct super_block *s, void *data, int silent)
sbi->version = maxproto > AUTOFS_MAX_PROTO_VERSION ? AUTOFS_MAX_PROTO_VERSION : maxproto; sbi->version = maxproto > AUTOFS_MAX_PROTO_VERSION ? AUTOFS_MAX_PROTO_VERSION : maxproto;
sbi->sub_version = AUTOFS_PROTO_SUBVERSION; sbi->sub_version = AUTOFS_PROTO_SUBVERSION;
DPRINTK(("autofs: pipe fd = %d, pgrp = %u\n", pipefd, sbi->oz_pgrp)); DPRINTK("pipe fd = %d, pgrp = %u", pipefd, sbi->oz_pgrp);
pipe = fget(pipefd); pipe = fget(pipefd);
if ( !pipe ) { if ( !pipe ) {
......
...@@ -69,8 +69,7 @@ static int autofs4_root_readdir(struct file *file, void *dirent, ...@@ -69,8 +69,7 @@ static int autofs4_root_readdir(struct file *file, void *dirent,
struct autofs_sb_info *sbi = autofs4_sbi(file->f_dentry->d_sb); struct autofs_sb_info *sbi = autofs4_sbi(file->f_dentry->d_sb);
int oz_mode = autofs4_oz_mode(sbi); int oz_mode = autofs4_oz_mode(sbi);
DPRINTK(("autofs4_root_readdir called, filp->f_pos = %lld\n", DPRINTK("called, filp->f_pos = %lld", file->f_pos);
file->f_pos));
/* /*
* Don't set reghost flag if: * Don't set reghost flag if:
...@@ -81,8 +80,7 @@ static int autofs4_root_readdir(struct file *file, void *dirent, ...@@ -81,8 +80,7 @@ static int autofs4_root_readdir(struct file *file, void *dirent,
if (oz_mode && file->f_pos == 0 && sbi->reghost_enabled) if (oz_mode && file->f_pos == 0 && sbi->reghost_enabled)
sbi->needs_reghost = 1; sbi->needs_reghost = 1;
DPRINTK(("autofs4_root_readdir: needs_reghost = %d\n", DPRINTK("needs_reghost = %d", sbi->needs_reghost);
sbi->needs_reghost));
return autofs4_dcache_readdir(file, dirent, filldir); return autofs4_dcache_readdir(file, dirent, filldir);
} }
...@@ -173,14 +171,14 @@ static int autofs4_dir_open(struct inode *inode, struct file *file) ...@@ -173,14 +171,14 @@ static int autofs4_dir_open(struct inode *inode, struct file *file)
struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
int status; int status;
DPRINTK(("autofs4_dir_open: file=%p dentry=%p %.*s\n", DPRINTK("file=%p dentry=%p %.*s",
file, dentry, dentry->d_name.len, dentry->d_name.name)); file, dentry, dentry->d_name.len, dentry->d_name.name);
if (autofs4_oz_mode(sbi)) if (autofs4_oz_mode(sbi))
goto out; goto out;
if (autofs4_ispending(dentry)) { if (autofs4_ispending(dentry)) {
DPRINTK(("autofs4_dir_open: dentry busy\n")); DPRINTK("dentry busy");
return -EBUSY; return -EBUSY;
} }
...@@ -227,14 +225,14 @@ static int autofs4_dir_close(struct inode *inode, struct file *file) ...@@ -227,14 +225,14 @@ static int autofs4_dir_close(struct inode *inode, struct file *file)
struct dentry *dentry = file->f_dentry; struct dentry *dentry = file->f_dentry;
struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
DPRINTK(("autofs4_dir_close: file=%p dentry=%p %.*s\n", DPRINTK("file=%p dentry=%p %.*s",
file, dentry, dentry->d_name.len, dentry->d_name.name)); file, dentry, dentry->d_name.len, dentry->d_name.name);
if (autofs4_oz_mode(sbi)) if (autofs4_oz_mode(sbi))
goto out; goto out;
if (autofs4_ispending(dentry)) { if (autofs4_ispending(dentry)) {
DPRINTK(("autofs4_dir_close: dentry busy\n")); DPRINTK("dentry busy");
return -EBUSY; return -EBUSY;
} }
...@@ -257,14 +255,14 @@ static int autofs4_dir_readdir(struct file *file, void *dirent, filldir_t filldi ...@@ -257,14 +255,14 @@ static int autofs4_dir_readdir(struct file *file, void *dirent, filldir_t filldi
struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb); struct autofs_sb_info *sbi = autofs4_sbi(dentry->d_sb);
int status; int status;
DPRINTK(("autofs4_readdir: file=%p dentry=%p %.*s\n", DPRINTK("file=%p dentry=%p %.*s",
file, dentry, dentry->d_name.len, dentry->d_name.name)); file, dentry, dentry->d_name.len, dentry->d_name.name);
if (autofs4_oz_mode(sbi)) if (autofs4_oz_mode(sbi))
goto out; goto out;
if (autofs4_ispending(dentry)) { if (autofs4_ispending(dentry)) {
DPRINTK(("autofs4_readdir: dentry busy\n")); DPRINTK("dentry busy");
return -EBUSY; return -EBUSY;
} }
...@@ -298,27 +296,27 @@ static int try_to_fill_dentry(struct dentry *dentry, ...@@ -298,27 +296,27 @@ static int try_to_fill_dentry(struct dentry *dentry,
when expiration is done to trigger mount request with a new when expiration is done to trigger mount request with a new
dentry */ dentry */
if (de_info && (de_info->flags & AUTOFS_INF_EXPIRING)) { if (de_info && (de_info->flags & AUTOFS_INF_EXPIRING)) {
DPRINTK(("try_to_fill_entry: waiting for expire %p name=%.*s\n", DPRINTK("waiting for expire %p name=%.*s",
dentry, dentry->d_name.len, dentry->d_name.name)); dentry, dentry->d_name.len, dentry->d_name.name);
status = autofs4_wait(sbi, dentry, NFY_NONE); status = autofs4_wait(sbi, dentry, NFY_NONE);
DPRINTK(("try_to_fill_entry: expire done status=%d\n", status)); DPRINTK("expire done status=%d", status);
return 0; return 0;
} }
DPRINTK(("try_to_fill_entry: dentry=%p %.*s ino=%p\n", DPRINTK("dentry=%p %.*s ino=%p",
dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode)); dentry, dentry->d_name.len, dentry->d_name.name, dentry->d_inode);
/* Wait for a pending mount, triggering one if there isn't one already */ /* Wait for a pending mount, triggering one if there isn't one already */
if (dentry->d_inode == NULL) { if (dentry->d_inode == NULL) {
DPRINTK(("try_to_fill_entry: waiting for mount name=%.*s\n", DPRINTK("waiting for mount name=%.*s",
dentry->d_name.len, dentry->d_name.name)); dentry->d_name.len, dentry->d_name.name);
status = autofs4_wait(sbi, dentry, NFY_MOUNT); status = autofs4_wait(sbi, dentry, NFY_MOUNT);
DPRINTK(("try_to_fill_entry: mount done status=%d\n", status)); DPRINTK("mount done status=%d", status);
if (status && dentry->d_inode) if (status && dentry->d_inode)
return 0; /* Try to get the kernel to invalidate this dentry */ return 0; /* Try to get the kernel to invalidate this dentry */
...@@ -337,15 +335,15 @@ static int try_to_fill_dentry(struct dentry *dentry, ...@@ -337,15 +335,15 @@ static int try_to_fill_dentry(struct dentry *dentry,
/* Trigger mount for path component or follow link */ /* Trigger mount for path component or follow link */
} else if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) || } else if (flags & (LOOKUP_CONTINUE | LOOKUP_DIRECTORY) ||
current->link_count) { current->link_count) {
DPRINTK(("try_to_fill_entry: waiting for mount name=%.*s\n", DPRINTK("waiting for mount name=%.*s",
dentry->d_name.len, dentry->d_name.name)); dentry->d_name.len, dentry->d_name.name);
spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock);
dentry->d_flags |= DCACHE_AUTOFS_PENDING; dentry->d_flags |= DCACHE_AUTOFS_PENDING;
spin_unlock(&dentry->d_lock); spin_unlock(&dentry->d_lock);
status = autofs4_wait(sbi, dentry, NFY_MOUNT); status = autofs4_wait(sbi, dentry, NFY_MOUNT);
DPRINTK(("try_to_fill_entry: mount done status=%d\n", status)); DPRINTK("mount done status=%d", status);
if (status) { if (status) {
spin_lock(&dentry->d_lock); spin_lock(&dentry->d_lock);
...@@ -396,8 +394,8 @@ static int autofs4_revalidate(struct dentry * dentry, struct nameidata *nd) ...@@ -396,8 +394,8 @@ static int autofs4_revalidate(struct dentry * dentry, struct nameidata *nd)
if (S_ISDIR(dentry->d_inode->i_mode) && if (S_ISDIR(dentry->d_inode->i_mode) &&
!d_mountpoint(dentry) && !d_mountpoint(dentry) &&
list_empty(&dentry->d_subdirs)) { list_empty(&dentry->d_subdirs)) {
DPRINTK(("autofs4_root_revalidate: dentry=%p %.*s, emptydir\n", DPRINTK("dentry=%p %.*s, emptydir",
dentry, dentry->d_name.len, dentry->d_name.name)); dentry, dentry->d_name.len, dentry->d_name.name);
spin_unlock(&dcache_lock); spin_unlock(&dcache_lock);
if (!oz_mode) if (!oz_mode)
status = try_to_fill_dentry(dentry, dir->i_sb, sbi, flags); status = try_to_fill_dentry(dentry, dir->i_sb, sbi, flags);
...@@ -416,7 +414,7 @@ static void autofs4_dentry_release(struct dentry *de) ...@@ -416,7 +414,7 @@ static void autofs4_dentry_release(struct dentry *de)
{ {
struct autofs_info *inf; struct autofs_info *inf;
DPRINTK(("autofs4_dentry_release: releasing %p\n", de)); DPRINTK("releasing %p", de);
inf = autofs4_dentry_ino(de); inf = autofs4_dentry_ino(de);
de->d_fsdata = NULL; de->d_fsdata = NULL;
...@@ -446,9 +444,9 @@ static struct dentry_operations autofs4_dentry_operations = { ...@@ -446,9 +444,9 @@ static struct dentry_operations autofs4_dentry_operations = {
static struct dentry *autofs4_dir_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd) static struct dentry *autofs4_dir_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd)
{ {
#if 0 #if 0
DPRINTK(("autofs4_dir_lookup: iignoring lookup of %.*s/%.*s\n", DPRINTK("ignoring lookup of %.*s/%.*s",
dentry->d_parent->d_name.len, dentry->d_parent->d_name.name, dentry->d_parent->d_name.len, dentry->d_parent->d_name.name,
dentry->d_name.len, dentry->d_name.name)); dentry->d_name.len, dentry->d_name.name);
#endif #endif
dentry->d_fsdata = NULL; dentry->d_fsdata = NULL;
...@@ -462,8 +460,8 @@ static struct dentry *autofs4_root_lookup(struct inode *dir, struct dentry *dent ...@@ -462,8 +460,8 @@ static struct dentry *autofs4_root_lookup(struct inode *dir, struct dentry *dent
struct autofs_sb_info *sbi; struct autofs_sb_info *sbi;
int oz_mode; int oz_mode;
DPRINTK(("autofs4_root_lookup: name = %.*s\n", DPRINTK("name = %.*s",
dentry->d_name.len, dentry->d_name.name)); dentry->d_name.len, dentry->d_name.name);
if (dentry->d_name.len > NAME_MAX) if (dentry->d_name.len > NAME_MAX)
return ERR_PTR(-ENAMETOOLONG);/* File name too long to exist */ return ERR_PTR(-ENAMETOOLONG);/* File name too long to exist */
...@@ -471,8 +469,8 @@ static struct dentry *autofs4_root_lookup(struct inode *dir, struct dentry *dent ...@@ -471,8 +469,8 @@ static struct dentry *autofs4_root_lookup(struct inode *dir, struct dentry *dent
sbi = autofs4_sbi(dir->i_sb); sbi = autofs4_sbi(dir->i_sb);
oz_mode = autofs4_oz_mode(sbi); oz_mode = autofs4_oz_mode(sbi);
DPRINTK(("autofs4_lookup: pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d\n", DPRINTK("pid = %u, pgrp = %u, catatonic = %d, oz_mode = %d",
current->pid, process_group(current), sbi->catatonic, oz_mode)); current->pid, process_group(current), sbi->catatonic, oz_mode);
/* /*
* Mark the dentry incomplete, but add it. This is needed so * Mark the dentry incomplete, but add it. This is needed so
...@@ -537,8 +535,8 @@ static int autofs4_dir_symlink(struct inode *dir, ...@@ -537,8 +535,8 @@ static int autofs4_dir_symlink(struct inode *dir,
struct inode *inode; struct inode *inode;
char *cp; char *cp;
DPRINTK(("autofs4_dir_symlink: %s <- %.*s\n", symname, DPRINTK("%s <- %.*s", symname,
dentry->d_name.len, dentry->d_name.name)); dentry->d_name.len, dentry->d_name.name);
if (!autofs4_oz_mode(sbi)) if (!autofs4_oz_mode(sbi))
return -EACCES; return -EACCES;
...@@ -646,8 +644,8 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode) ...@@ -646,8 +644,8 @@ static int autofs4_dir_mkdir(struct inode *dir, struct dentry *dentry, int mode)
if ( !autofs4_oz_mode(sbi) ) if ( !autofs4_oz_mode(sbi) )
return -EACCES; return -EACCES;
DPRINTK(("autofs4_dir_mkdir: dentry %p, creating %.*s\n", DPRINTK("dentry %p, creating %.*s",
dentry, dentry->d_name.len, dentry->d_name.name)); dentry, dentry->d_name.len, dentry->d_name.name);
ino = autofs4_init_ino(ino, sbi, S_IFDIR | 0555); ino = autofs4_init_ino(ino, sbi, S_IFDIR | 0555);
if (ino == NULL) if (ino == NULL)
...@@ -709,7 +707,7 @@ static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int *p) ...@@ -709,7 +707,7 @@ static inline int autofs4_ask_reghost(struct autofs_sb_info *sbi, int *p)
{ {
int status; int status;
DPRINTK(("autofs_ask_reghost: returning %d\n", sbi->needs_reghost)); DPRINTK("returning %d", sbi->needs_reghost);
status = put_user(sbi->needs_reghost, p); status = put_user(sbi->needs_reghost, p);
if ( status ) if ( status )
...@@ -729,7 +727,7 @@ static inline int autofs4_toggle_reghost(struct autofs_sb_info *sbi, int *p) ...@@ -729,7 +727,7 @@ static inline int autofs4_toggle_reghost(struct autofs_sb_info *sbi, int *p)
status = get_user(val, p); status = get_user(val, p);
DPRINTK(("autofs4_toggle_reghost: reghost = %d\n", val)); DPRINTK("reghost = %d", val);
if (status) if (status)
return status; return status;
...@@ -749,7 +747,7 @@ static inline int autofs4_ask_umount(struct vfsmount *mnt, int *p) ...@@ -749,7 +747,7 @@ static inline int autofs4_ask_umount(struct vfsmount *mnt, int *p)
if (may_umount(mnt) == 0) if (may_umount(mnt) == 0)
status = 1; status = 1;
DPRINTK(("autofs_ask_umount: returning %d\n", status)); DPRINTK("returning %d", status);
status = put_user(status, p); status = put_user(status, p);
...@@ -777,8 +775,8 @@ static int autofs4_root_ioctl(struct inode *inode, struct file *filp, ...@@ -777,8 +775,8 @@ static int autofs4_root_ioctl(struct inode *inode, struct file *filp,
{ {
struct autofs_sb_info *sbi = autofs4_sbi(inode->i_sb); struct autofs_sb_info *sbi = autofs4_sbi(inode->i_sb);
DPRINTK(("autofs4_root_ioctl: cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u\n", DPRINTK("cmd = 0x%08x, arg = 0x%08lx, sbi = %p, pgrp = %u",
cmd,arg,sbi,process_group(current))); cmd,arg,sbi,process_group(current));
if ( _IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) || if ( _IOC_TYPE(cmd) != _IOC_TYPE(AUTOFS_IOC_FIRST) ||
_IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT ) _IOC_NR(cmd) - _IOC_NR(AUTOFS_IOC_FIRST) >= AUTOFS_IOC_COUNT )
......
...@@ -28,7 +28,7 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi) ...@@ -28,7 +28,7 @@ void autofs4_catatonic_mode(struct autofs_sb_info *sbi)
{ {
struct autofs_wait_queue *wq, *nwq; struct autofs_wait_queue *wq, *nwq;
DPRINTK(("autofs: entering catatonic mode\n")); DPRINTK("entering catatonic mode");
sbi->catatonic = 1; sbi->catatonic = 1;
wq = sbi->queues; wq = sbi->queues;
...@@ -91,8 +91,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi, ...@@ -91,8 +91,8 @@ static void autofs4_notify_daemon(struct autofs_sb_info *sbi,
union autofs_packet_union pkt; union autofs_packet_union pkt;
size_t pktsz; size_t pktsz;
DPRINTK(("autofs4_notify_daemon: wait id = 0x%08lx, name = %.*s, type=%d\n", DPRINTK("wait id = 0x%08lx, name = %.*s, type=%d",
wq->wait_queue_token, wq->len, wq->name, type)); wq->wait_queue_token, wq->len, wq->name, type);
memset(&pkt,0,sizeof pkt); /* For security reasons */ memset(&pkt,0,sizeof pkt); /* For security reasons */
...@@ -212,8 +212,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, ...@@ -212,8 +212,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
atomic_set(&wq->wait_ctr, 2); atomic_set(&wq->wait_ctr, 2);
up(&sbi->wq_sem); up(&sbi->wq_sem);
DPRINTK(("autofs4_wait: new wait id = 0x%08lx, name = %.*s, nfy=%d\n", DPRINTK("new wait id = 0x%08lx, name = %.*s, nfy=%d",
(unsigned long) wq->wait_queue_token, wq->len, wq->name, notify)); (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
/* autofs4_notify_daemon() may block */ /* autofs4_notify_daemon() may block */
if (notify != NFY_NONE) { if (notify != NFY_NONE) {
autofs4_notify_daemon(sbi,wq, autofs4_notify_daemon(sbi,wq,
...@@ -224,8 +224,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, ...@@ -224,8 +224,8 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
} else { } else {
atomic_inc(&wq->wait_ctr); atomic_inc(&wq->wait_ctr);
up(&sbi->wq_sem); up(&sbi->wq_sem);
DPRINTK(("autofs4_wait: existing wait id = 0x%08lx, name = %.*s, nfy=%d\n", DPRINTK("existing wait id = 0x%08lx, name = %.*s, nfy=%d",
(unsigned long) wq->wait_queue_token, wq->len, wq->name, notify)); (unsigned long) wq->wait_queue_token, wq->len, wq->name, notify);
} }
/* wq->name is NULL if and only if the lock is already released */ /* wq->name is NULL if and only if the lock is already released */
...@@ -257,7 +257,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry, ...@@ -257,7 +257,7 @@ int autofs4_wait(struct autofs_sb_info *sbi, struct dentry *dentry,
recalc_sigpending(); recalc_sigpending();
spin_unlock_irqrestore(&current->sighand->siglock, irqflags); spin_unlock_irqrestore(&current->sighand->siglock, irqflags);
} else { } else {
DPRINTK(("autofs4_wait: skipped sleeping\n")); DPRINTK("skipped sleeping");
} }
status = wq->status; status = wq->status;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment