Commit b831516c authored by Peng Tao's avatar Peng Tao Committed by Greg Kroah-Hartman

staging/lustre/libcfs: remove filp_size/filp_poff

Cc: Andreas Dilger <andreas.dilger@intel.com>
Signed-off-by: default avatarPeng Tao <bergwolf@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a34c72b3
...@@ -52,11 +52,6 @@ ...@@ -52,11 +52,6 @@
#include <linux/backing-dev.h> #include <linux/backing-dev.h>
#include <linux/posix_acl_xattr.h> #include <linux/posix_acl_xattr.h>
#define filp_size(f) \
(i_size_read((f)->f_dentry->d_inode))
#define filp_poff(f) \
(&(f)->f_pos)
# define do_fsync(fp, flag) \ # define do_fsync(fp, flag) \
((fp)->f_op->fsync(fp, 0, LLONG_MAX, flag)) ((fp)->f_op->fsync(fp, 0, LLONG_MAX, flag))
......
...@@ -709,7 +709,7 @@ int cfs_tracefile_dump_all_pages(char *filename) ...@@ -709,7 +709,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
__LASSERT_TAGE_INVARIANT(tage); __LASSERT_TAGE_INVARIANT(tage);
rc = filp_write(filp, page_address(tage->page), rc = filp_write(filp, page_address(tage->page),
tage->used, filp_poff(filp)); tage->used, &filp->f_pos);
if (rc != (int)tage->used) { if (rc != (int)tage->used) {
printk(KERN_WARNING "wanted to write %u but wrote " printk(KERN_WARNING "wanted to write %u but wrote "
"%d\n", tage->used, rc); "%d\n", tage->used, rc);
...@@ -1020,8 +1020,8 @@ static int tracefiled(void *arg) ...@@ -1020,8 +1020,8 @@ static int tracefiled(void *arg)
if (f_pos >= (off_t)cfs_tracefile_size) if (f_pos >= (off_t)cfs_tracefile_size)
f_pos = 0; f_pos = 0;
else if (f_pos > (off_t)filp_size(filp)) else if (f_pos > i_size_read(filp->f_dentry->d_inode))
f_pos = filp_size(filp); f_pos = i_size_read(filp->f_dentry->d_inode);
rc = filp_write(filp, page_address(tage->page), rc = filp_write(filp, page_address(tage->page),
tage->used, &f_pos); tage->used, &f_pos);
......
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