diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2011-02-28 06:34:01 -0500 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2011-03-15 10:57:39 -0400 |
commit | a12119087bd803d3fa0b067ee18497e2e5d064cd (patch) | |
tree | 088cf00ddc75e8a30e3680c6df40ebe2fa7a153d /fs | |
parent | 5ffc0cb308f69cea36058d308d911f26ee59316e (diff) |
fs/9p: Don't set stat.st_blocks based on nrpages
simple_getattr does set stat.st_blocks to a value
derived from nrpages. That is not correct with 9p
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/9p/vfs_inode.c | 7 | ||||
-rw-r--r-- | fs/9p/vfs_inode_dotl.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c index 445dd283dc15..304904b40610 100644 --- a/fs/9p/vfs_inode.c +++ b/fs/9p/vfs_inode.c | |||
@@ -891,9 +891,10 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry, | |||
891 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); | 891 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); |
892 | err = -EPERM; | 892 | err = -EPERM; |
893 | v9ses = v9fs_inode2v9ses(dentry->d_inode); | 893 | v9ses = v9fs_inode2v9ses(dentry->d_inode); |
894 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) | 894 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { |
895 | return simple_getattr(mnt, dentry, stat); | 895 | generic_fillattr(dentry->d_inode, stat); |
896 | 896 | return 0; | |
897 | } | ||
897 | fid = v9fs_fid_lookup(dentry); | 898 | fid = v9fs_fid_lookup(dentry); |
898 | if (IS_ERR(fid)) | 899 | if (IS_ERR(fid)) |
899 | return PTR_ERR(fid); | 900 | return PTR_ERR(fid); |
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c index 6f62320eda89..a2a3d7edb17c 100644 --- a/fs/9p/vfs_inode_dotl.c +++ b/fs/9p/vfs_inode_dotl.c | |||
@@ -387,9 +387,10 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry, | |||
387 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); | 387 | P9_DPRINTK(P9_DEBUG_VFS, "dentry: %p\n", dentry); |
388 | err = -EPERM; | 388 | err = -EPERM; |
389 | v9ses = v9fs_inode2v9ses(dentry->d_inode); | 389 | v9ses = v9fs_inode2v9ses(dentry->d_inode); |
390 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) | 390 | if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { |
391 | return simple_getattr(mnt, dentry, stat); | 391 | generic_fillattr(dentry->d_inode, stat); |
392 | 392 | return 0; | |
393 | } | ||
393 | fid = v9fs_fid_lookup(dentry); | 394 | fid = v9fs_fid_lookup(dentry); |
394 | if (IS_ERR(fid)) | 395 | if (IS_ERR(fid)) |
395 | return PTR_ERR(fid); | 396 | return PTR_ERR(fid); |