diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2013-01-23 17:07:38 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2013-02-22 23:31:31 -0500 |
commit | 496ad9aa8ef448058e36ca7a787c61f2e63f0f54 (patch) | |
tree | 8f4abde793cd7db5bb8fde6d27ebcacd0e54379a /fs/ocfs2/file.c | |
parent | 57eccb830f1cc93d4b506ba306d8dfa685e0c88f (diff) |
new helper: file_inode(file)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r-- | fs/ocfs2/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c index 37d313ede159..04098af9dbc8 100644 --- a/fs/ocfs2/file.c +++ b/fs/ocfs2/file.c | |||
@@ -1949,7 +1949,7 @@ out: | |||
1949 | int ocfs2_change_file_space(struct file *file, unsigned int cmd, | 1949 | int ocfs2_change_file_space(struct file *file, unsigned int cmd, |
1950 | struct ocfs2_space_resv *sr) | 1950 | struct ocfs2_space_resv *sr) |
1951 | { | 1951 | { |
1952 | struct inode *inode = file->f_path.dentry->d_inode; | 1952 | struct inode *inode = file_inode(file); |
1953 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1953 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
1954 | int ret; | 1954 | int ret; |
1955 | 1955 | ||
@@ -1977,7 +1977,7 @@ int ocfs2_change_file_space(struct file *file, unsigned int cmd, | |||
1977 | static long ocfs2_fallocate(struct file *file, int mode, loff_t offset, | 1977 | static long ocfs2_fallocate(struct file *file, int mode, loff_t offset, |
1978 | loff_t len) | 1978 | loff_t len) |
1979 | { | 1979 | { |
1980 | struct inode *inode = file->f_path.dentry->d_inode; | 1980 | struct inode *inode = file_inode(file); |
1981 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 1981 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
1982 | struct ocfs2_space_resv sr; | 1982 | struct ocfs2_space_resv sr; |
1983 | int change_size = 1; | 1983 | int change_size = 1; |
@@ -2232,7 +2232,7 @@ static ssize_t ocfs2_file_aio_write(struct kiocb *iocb, | |||
2232 | loff_t old_size, *ppos = &iocb->ki_pos; | 2232 | loff_t old_size, *ppos = &iocb->ki_pos; |
2233 | u32 old_clusters; | 2233 | u32 old_clusters; |
2234 | struct file *file = iocb->ki_filp; | 2234 | struct file *file = iocb->ki_filp; |
2235 | struct inode *inode = file->f_path.dentry->d_inode; | 2235 | struct inode *inode = file_inode(file); |
2236 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); | 2236 | struct ocfs2_super *osb = OCFS2_SB(inode->i_sb); |
2237 | int full_coherency = !(osb->s_mount_opt & | 2237 | int full_coherency = !(osb->s_mount_opt & |
2238 | OCFS2_MOUNT_COHERENCY_BUFFERED); | 2238 | OCFS2_MOUNT_COHERENCY_BUFFERED); |
@@ -2516,7 +2516,7 @@ static ssize_t ocfs2_file_splice_read(struct file *in, | |||
2516 | unsigned int flags) | 2516 | unsigned int flags) |
2517 | { | 2517 | { |
2518 | int ret = 0, lock_level = 0; | 2518 | int ret = 0, lock_level = 0; |
2519 | struct inode *inode = in->f_path.dentry->d_inode; | 2519 | struct inode *inode = file_inode(in); |
2520 | 2520 | ||
2521 | trace_ocfs2_file_splice_read(inode, in, in->f_path.dentry, | 2521 | trace_ocfs2_file_splice_read(inode, in, in->f_path.dentry, |
2522 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 2522 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |
@@ -2546,7 +2546,7 @@ static ssize_t ocfs2_file_aio_read(struct kiocb *iocb, | |||
2546 | { | 2546 | { |
2547 | int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0; | 2547 | int ret = 0, rw_level = -1, have_alloc_sem = 0, lock_level = 0; |
2548 | struct file *filp = iocb->ki_filp; | 2548 | struct file *filp = iocb->ki_filp; |
2549 | struct inode *inode = filp->f_path.dentry->d_inode; | 2549 | struct inode *inode = file_inode(filp); |
2550 | 2550 | ||
2551 | trace_ocfs2_file_aio_read(inode, filp, filp->f_path.dentry, | 2551 | trace_ocfs2_file_aio_read(inode, filp, filp->f_path.dentry, |
2552 | (unsigned long long)OCFS2_I(inode)->ip_blkno, | 2552 | (unsigned long long)OCFS2_I(inode)->ip_blkno, |