aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/file.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-01-23 17:07:38 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-02-22 23:31:31 -0500
commit496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch)
tree8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/btrfs/file.c
parent57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff)
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/btrfs/file.c')
-rw-r--r--fs/btrfs/file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index 77061bf43edb..4118e0b6e339 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@ -1211,7 +1211,7 @@ static noinline int prepare_pages(struct btrfs_root *root, struct file *file,
1211 struct extent_state *cached_state = NULL; 1211 struct extent_state *cached_state = NULL;
1212 int i; 1212 int i;
1213 unsigned long index = pos >> PAGE_CACHE_SHIFT; 1213 unsigned long index = pos >> PAGE_CACHE_SHIFT;
1214 struct inode *inode = fdentry(file)->d_inode; 1214 struct inode *inode = file_inode(file);
1215 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping); 1215 gfp_t mask = btrfs_alloc_write_mask(inode->i_mapping);
1216 int err = 0; 1216 int err = 0;
1217 int faili = 0; 1217 int faili = 0;
@@ -1298,7 +1298,7 @@ static noinline ssize_t __btrfs_buffered_write(struct file *file,
1298 struct iov_iter *i, 1298 struct iov_iter *i,
1299 loff_t pos) 1299 loff_t pos)
1300{ 1300{
1301 struct inode *inode = fdentry(file)->d_inode; 1301 struct inode *inode = file_inode(file);
1302 struct btrfs_root *root = BTRFS_I(inode)->root; 1302 struct btrfs_root *root = BTRFS_I(inode)->root;
1303 struct page **pages = NULL; 1303 struct page **pages = NULL;
1304 unsigned long first_index; 1304 unsigned long first_index;
@@ -1486,7 +1486,7 @@ static ssize_t btrfs_file_aio_write(struct kiocb *iocb,
1486 unsigned long nr_segs, loff_t pos) 1486 unsigned long nr_segs, loff_t pos)
1487{ 1487{
1488 struct file *file = iocb->ki_filp; 1488 struct file *file = iocb->ki_filp;
1489 struct inode *inode = fdentry(file)->d_inode; 1489 struct inode *inode = file_inode(file);
1490 struct btrfs_root *root = BTRFS_I(inode)->root; 1490 struct btrfs_root *root = BTRFS_I(inode)->root;
1491 loff_t *ppos = &iocb->ki_pos; 1491 loff_t *ppos = &iocb->ki_pos;
1492 u64 start_pos; 1492 u64 start_pos;
@@ -2087,7 +2087,7 @@ out:
2087static long btrfs_fallocate(struct file *file, int mode, 2087static long btrfs_fallocate(struct file *file, int mode,
2088 loff_t offset, loff_t len) 2088 loff_t offset, loff_t len)
2089{ 2089{
2090 struct inode *inode = file->f_path.dentry->d_inode; 2090 struct inode *inode = file_inode(file);
2091 struct extent_state *cached_state = NULL; 2091 struct extent_state *cached_state = NULL;
2092 u64 cur_offset; 2092 u64 cur_offset;
2093 u64 last_byte; 2093 u64 last_byte;