diff options
author | Evgeniy Dushistov <dushistov@mail.ru> | 2006-06-25 14:47:24 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-25 19:01:03 +0200 |
commit | abf5d15fd2e52517dd56a17a846d5a1f900b7db4 (patch) | |
tree | ea537760c201cea57b468044dc733e06781ece2b /fs/ufs/namei.c | |
parent | [PATCH] ufs: Unmark CONFIG_UFS_FS_WRITE as BROKEN (diff) | |
download | linux-abf5d15fd2e52517dd56a17a846d5a1f900b7db4.tar.xz linux-abf5d15fd2e52517dd56a17a846d5a1f900b7db4.zip |
[PATCH] ufs: easy debug
Currently to turn on debug mode "user" has to edit ~10 files, to turn off he
has to do it again.
This patch introduce such changes:
1)turn on(off) debug messages via ".config"
2)remove unnecessary duplication of code
3)make "UFSD" macros more similar to function
4)fix some compiler warnings
Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ufs/namei.c')
-rw-r--r-- | fs/ufs/namei.c | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 364bb92b0917..abd5f23a426d 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -34,17 +34,6 @@ #include "swab.h" /* will go away - see comment in mknod() */ #include "util.h" -/* -#undef UFS_NAMEI_DEBUG -*/ -#define UFS_NAMEI_DEBUG - -#ifdef UFS_NAMEI_DEBUG -#define UFSD(x) printk("(%s, %d), %s: ", __FILE__, __LINE__, __FUNCTION__); printk x; -#else -#define UFSD(x) -#endif - static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) { int err = ufs_add_link(dentry, inode); @@ -90,8 +79,13 @@ static struct dentry *ufs_lookup(struct inode * dir, struct dentry *dentry, stru static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, struct nameidata *nd) { - struct inode * inode = ufs_new_inode(dir, mode); - int err = PTR_ERR(inode); + struct inode *inode; + int err; + + UFSD("BEGIN\n"); + inode = ufs_new_inode(dir, mode); + err = PTR_ERR(inode); + if (!IS_ERR(inode)) { inode->i_op = &ufs_file_inode_operations; inode->i_fop = &ufs_file_operations; @@ -101,6 +95,7 @@ static int ufs_create (struct inode * dir, struct dentry * dentry, int mode, err = ufs_add_nondir(dentry, inode); unlock_kernel(); } + UFSD("END: err=%d\n", err); return err; } |