aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2013-12-17 12:20:16 -0500
committerTrond Myklebust <trond.myklebust@primarydata.com>2014-01-05 15:51:23 -0500
commit1e8968c5b0582392d5f132422f581e3ebc24e627 (patch)
tree1fbb842ca0b18d421f1e74b046324e38dbcb58c3 /fs/nfs/dir.c
parenta8c2275493b866961f4429a741251c630c4fc6d7 (diff)
NFS: dprintk() should not print negative fileids and inode numbers
A fileid in NFS is a uint64. There are some occurrences where dprintk() outputs a signed fileid. This leads to confusion and more difficult to read debugging (negative fileids matching positive inode numbers). Signed-off-by: Niels de Vos <ndevos@redhat.com> CC: Santosh Pradhan <spradhan@redhat.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 812154aff981..b266f734bd53 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -1404,7 +1404,7 @@ int nfs_atomic_open(struct inode *dir, struct dentry *dentry,
1404 /* Expect a negative dentry */ 1404 /* Expect a negative dentry */
1405 BUG_ON(dentry->d_inode); 1405 BUG_ON(dentry->d_inode);
1406 1406
1407 dfprintk(VFS, "NFS: atomic_open(%s/%ld), %pd\n", 1407 dfprintk(VFS, "NFS: atomic_open(%s/%lu), %pd\n",
1408 dir->i_sb->s_id, dir->i_ino, dentry); 1408 dir->i_sb->s_id, dir->i_ino, dentry);
1409 1409
1410 err = nfs_check_flags(open_flags); 1410 err = nfs_check_flags(open_flags);
@@ -1594,7 +1594,7 @@ int nfs_create(struct inode *dir, struct dentry *dentry,
1594 int open_flags = excl ? O_CREAT | O_EXCL : O_CREAT; 1594 int open_flags = excl ? O_CREAT | O_EXCL : O_CREAT;
1595 int error; 1595 int error;
1596 1596
1597 dfprintk(VFS, "NFS: create(%s/%ld), %pd\n", 1597 dfprintk(VFS, "NFS: create(%s/%lu), %pd\n",
1598 dir->i_sb->s_id, dir->i_ino, dentry); 1598 dir->i_sb->s_id, dir->i_ino, dentry);
1599 1599
1600 attr.ia_mode = mode; 1600 attr.ia_mode = mode;
@@ -1621,7 +1621,7 @@ nfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, dev_t rdev)
1621 struct iattr attr; 1621 struct iattr attr;
1622 int status; 1622 int status;
1623 1623
1624 dfprintk(VFS, "NFS: mknod(%s/%ld), %pd\n", 1624 dfprintk(VFS, "NFS: mknod(%s/%lu), %pd\n",
1625 dir->i_sb->s_id, dir->i_ino, dentry); 1625 dir->i_sb->s_id, dir->i_ino, dentry);
1626 1626
1627 if (!new_valid_dev(rdev)) 1627 if (!new_valid_dev(rdev))
@@ -1650,7 +1650,7 @@ int nfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
1650 struct iattr attr; 1650 struct iattr attr;
1651 int error; 1651 int error;
1652 1652
1653 dfprintk(VFS, "NFS: mkdir(%s/%ld), %pd\n", 1653 dfprintk(VFS, "NFS: mkdir(%s/%lu), %pd\n",
1654 dir->i_sb->s_id, dir->i_ino, dentry); 1654 dir->i_sb->s_id, dir->i_ino, dentry);
1655 1655
1656 attr.ia_valid = ATTR_MODE; 1656 attr.ia_valid = ATTR_MODE;
@@ -1678,7 +1678,7 @@ int nfs_rmdir(struct inode *dir, struct dentry *dentry)
1678{ 1678{
1679 int error; 1679 int error;
1680 1680
1681 dfprintk(VFS, "NFS: rmdir(%s/%ld), %pd\n", 1681 dfprintk(VFS, "NFS: rmdir(%s/%lu), %pd\n",
1682 dir->i_sb->s_id, dir->i_ino, dentry); 1682 dir->i_sb->s_id, dir->i_ino, dentry);
1683 1683
1684 trace_nfs_rmdir_enter(dir, dentry); 1684 trace_nfs_rmdir_enter(dir, dentry);
@@ -1747,7 +1747,7 @@ int nfs_unlink(struct inode *dir, struct dentry *dentry)
1747 int error; 1747 int error;
1748 int need_rehash = 0; 1748 int need_rehash = 0;
1749 1749
1750 dfprintk(VFS, "NFS: unlink(%s/%ld, %pd)\n", dir->i_sb->s_id, 1750 dfprintk(VFS, "NFS: unlink(%s/%lu, %pd)\n", dir->i_sb->s_id,
1751 dir->i_ino, dentry); 1751 dir->i_ino, dentry);
1752 1752
1753 trace_nfs_unlink_enter(dir, dentry); 1753 trace_nfs_unlink_enter(dir, dentry);
@@ -1798,7 +1798,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
1798 unsigned int pathlen = strlen(symname); 1798 unsigned int pathlen = strlen(symname);
1799 int error; 1799 int error;
1800 1800
1801 dfprintk(VFS, "NFS: symlink(%s/%ld, %pd, %s)\n", dir->i_sb->s_id, 1801 dfprintk(VFS, "NFS: symlink(%s/%lu, %pd, %s)\n", dir->i_sb->s_id,
1802 dir->i_ino, dentry, symname); 1802 dir->i_ino, dentry, symname);
1803 1803
1804 if (pathlen > PAGE_SIZE) 1804 if (pathlen > PAGE_SIZE)
@@ -1821,7 +1821,7 @@ int nfs_symlink(struct inode *dir, struct dentry *dentry, const char *symname)
1821 error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr); 1821 error = NFS_PROTO(dir)->symlink(dir, dentry, page, pathlen, &attr);
1822 trace_nfs_symlink_exit(dir, dentry, error); 1822 trace_nfs_symlink_exit(dir, dentry, error);
1823 if (error != 0) { 1823 if (error != 0) {
1824 dfprintk(VFS, "NFS: symlink(%s/%ld, %pd, %s) error %d\n", 1824 dfprintk(VFS, "NFS: symlink(%s/%lu, %pd, %s) error %d\n",
1825 dir->i_sb->s_id, dir->i_ino, 1825 dir->i_sb->s_id, dir->i_ino,
1826 dentry, symname, error); 1826 dentry, symname, error);
1827 d_drop(dentry); 1827 d_drop(dentry);
@@ -2304,7 +2304,7 @@ out:
2304 if (!res && (mask & MAY_EXEC) && !execute_ok(inode)) 2304 if (!res && (mask & MAY_EXEC) && !execute_ok(inode))
2305 res = -EACCES; 2305 res = -EACCES;
2306 2306
2307 dfprintk(VFS, "NFS: permission(%s/%ld), mask=0x%x, res=%d\n", 2307 dfprintk(VFS, "NFS: permission(%s/%lu), mask=0x%x, res=%d\n",
2308 inode->i_sb->s_id, inode->i_ino, mask, res); 2308 inode->i_sb->s_id, inode->i_ino, mask, res);
2309 return res; 2309 return res;
2310out_notsup: 2310out_notsup: