mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
new helper: file_inode(file)
Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
57eccb830f
commit
496ad9aa8e
306 changed files with 696 additions and 717 deletions
|
|
@ -393,12 +393,12 @@ static int afs_readdir(struct file *file, void *cookie, filldir_t filldir)
|
|||
int ret;
|
||||
|
||||
_enter("{%Ld,{%lu}}",
|
||||
file->f_pos, file->f_path.dentry->d_inode->i_ino);
|
||||
file->f_pos, file_inode(file)->i_ino);
|
||||
|
||||
ASSERT(file->private_data != NULL);
|
||||
|
||||
fpos = file->f_pos;
|
||||
ret = afs_dir_iterate(file->f_path.dentry->d_inode, &fpos,
|
||||
ret = afs_dir_iterate(file_inode(file), &fpos,
|
||||
cookie, filldir, file->private_data);
|
||||
file->f_pos = fpos;
|
||||
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ error:
|
|||
*/
|
||||
int afs_lock(struct file *file, int cmd, struct file_lock *fl)
|
||||
{
|
||||
struct afs_vnode *vnode = AFS_FS_I(file->f_dentry->d_inode);
|
||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
||||
|
||||
_enter("{%x:%u},%d,{t=%x,fl=%x,r=%Ld:%Ld}",
|
||||
vnode->fid.vid, vnode->fid.vnode, cmd,
|
||||
|
|
@ -537,7 +537,7 @@ int afs_lock(struct file *file, int cmd, struct file_lock *fl)
|
|||
*/
|
||||
int afs_flock(struct file *file, int cmd, struct file_lock *fl)
|
||||
{
|
||||
struct afs_vnode *vnode = AFS_FS_I(file->f_dentry->d_inode);
|
||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
||||
|
||||
_enter("{%x:%u},%d,{t=%x,fl=%x}",
|
||||
vnode->fid.vid, vnode->fid.vnode, cmd,
|
||||
|
|
|
|||
|
|
@ -120,7 +120,7 @@ int afs_write_begin(struct file *file, struct address_space *mapping,
|
|||
struct page **pagep, void **fsdata)
|
||||
{
|
||||
struct afs_writeback *candidate, *wb;
|
||||
struct afs_vnode *vnode = AFS_FS_I(file->f_dentry->d_inode);
|
||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
||||
struct page *page;
|
||||
struct key *key = file->private_data;
|
||||
unsigned from = pos & (PAGE_CACHE_SIZE - 1);
|
||||
|
|
@ -245,7 +245,7 @@ int afs_write_end(struct file *file, struct address_space *mapping,
|
|||
loff_t pos, unsigned len, unsigned copied,
|
||||
struct page *page, void *fsdata)
|
||||
{
|
||||
struct afs_vnode *vnode = AFS_FS_I(file->f_dentry->d_inode);
|
||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(file));
|
||||
loff_t i_size, maybe_i_size;
|
||||
|
||||
_enter("{%x:%u},{%lx}",
|
||||
|
|
@ -627,8 +627,7 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
|
|||
ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
unsigned long nr_segs, loff_t pos)
|
||||
{
|
||||
struct dentry *dentry = iocb->ki_filp->f_path.dentry;
|
||||
struct afs_vnode *vnode = AFS_FS_I(dentry->d_inode);
|
||||
struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp));
|
||||
ssize_t result;
|
||||
size_t count = iov_length(iov, nr_segs);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue