From dfe0a65d9369249b391730c4d25f37ec0185fc7e Mon Sep 17 00:00:00 2001 From: Steven Whitehouse Date: Tue, 16 Oct 2001 10:38:13 +0000 Subject: [PATCH] o Tidy up, removing debugging printk's no longer needed --- driver/device-mapper/dmfs-lv.c | 11 +++++------ driver/device-mapper/dmfs-root.c | 8 ++++---- driver/device-mapper/dmfs-tdir.c | 4 ---- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/driver/device-mapper/dmfs-lv.c b/driver/device-mapper/dmfs-lv.c index a5541b316..25324e2e4 100644 --- a/driver/device-mapper/dmfs-lv.c +++ b/driver/device-mapper/dmfs-lv.c @@ -160,8 +160,8 @@ static int is_identifier(const char *str, int len) static int dmfs_lv_mkdir(struct inode *dir, struct dentry *dentry, int mode) { struct inode *inode; + int rv = -ENOSPC; - printk("lv mkdir\n"); if (dentry->d_name.len >= DM_NAME_LEN) return -EINVAL; @@ -174,14 +174,14 @@ static int dmfs_lv_mkdir(struct inode *dir, struct dentry *dentry, int mode) if (dentry->d_name.name[0] == '.') return -EINVAL; - printk("try create new tdir\n"); + inode = dmfs_create_tdir(dir->i_sb, mode); - if (!IS_ERR(inode)) { + if (inode) { d_instantiate(dentry, inode); dget(dentry); - return 0; + rv = 0; } - return PTR_ERR(inode); + return rv; } /* @@ -271,7 +271,6 @@ struct inode *dmfs_create_lv(struct super_block *sb, int mode, struct dentry *de return NULL; } DMFS_I(inode)->md = md; - printk("created new lv\n"); } return inode; diff --git a/driver/device-mapper/dmfs-root.c b/driver/device-mapper/dmfs-root.c index b724893f6..7fe2ab306 100644 --- a/driver/device-mapper/dmfs-root.c +++ b/driver/device-mapper/dmfs-root.c @@ -42,6 +42,7 @@ static int is_identifier(const char *str, int len) static int dmfs_root_mkdir(struct inode *dir, struct dentry *dentry, int mode) { struct inode *inode; + int rv = -ENOSPC; if (dentry->d_name.len >= DM_NAME_LEN) return -EINVAL; @@ -53,12 +54,12 @@ static int dmfs_root_mkdir(struct inode *dir, struct dentry *dentry, int mode) return -EINVAL; inode = dmfs_create_lv(dir->i_sb, mode, dentry); - if (!IS_ERR(inode)) { + if (inode) { d_instantiate(dentry, inode); dget(dentry); - return 0; + rv = 0; } - return PTR_ERR(inode); + return rv; } /* @@ -98,7 +99,6 @@ static int dmfs_root_rmdir(struct inode *dir, struct dentry *dentry) if (empty(dentry)) { struct inode *inode = dentry->d_inode; ret = dm_deactivate(DMFS_I(inode)->md); - printk("ret=%d\n", ret); if (ret == 0) { inode->i_nlink--; dput(dentry); diff --git a/driver/device-mapper/dmfs-tdir.c b/driver/device-mapper/dmfs-tdir.c index 47f423c08..9eebfd3ee 100644 --- a/driver/device-mapper/dmfs-tdir.c +++ b/driver/device-mapper/dmfs-tdir.c @@ -46,8 +46,6 @@ static struct dentry *dmfs_tdir_lookup(struct inode *dir, struct dentry *dentry) struct inode *inode = NULL; const char *name = dentry->d_name.name; - printk("tdir lookup\n"); - switch(dentry->d_name.len) { case 5: if (memcmp("table", name, 5) == 0) { @@ -72,8 +70,6 @@ static int dmfs_tdir_readdir(struct file *filp, void *dirent, filldir_t filldir) int i; struct dentry *dentry = filp->f_dentry; - printk("tdir readdir\n"); - i = filp->f_pos; switch(i) { case 0: