new helper: file_inode(file)
[linux-2.6-block.git] / fs / cifs / cifsfs.c
index de7f9168a1185ace14e8212040c96285c6c0bc31..8b35365c70be850516ff99dfec9eda259ed9f1ee 100644 (file)
@@ -677,7 +677,7 @@ out_nls:
 static ssize_t cifs_file_aio_write(struct kiocb *iocb, const struct iovec *iov,
                                   unsigned long nr_segs, loff_t pos)
 {
-       struct inode *inode = iocb->ki_filp->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(iocb->ki_filp);
        ssize_t written;
        int rc;
 
@@ -701,7 +701,7 @@ static loff_t cifs_llseek(struct file *file, loff_t offset, int whence)
         */
        if (whence != SEEK_SET && whence != SEEK_CUR) {
                int rc;
-               struct inode *inode = file->f_path.dentry->d_inode;
+               struct inode *inode = file_inode(file);
 
                /*
                 * We need to be sure that all dirty pages are written and the
@@ -733,7 +733,7 @@ static int cifs_setlease(struct file *file, long arg, struct file_lock **lease)
 {
        /* note that this is called by vfs setlease with lock_flocks held
           to protect *lease from going away */
-       struct inode *inode = file->f_path.dentry->d_inode;
+       struct inode *inode = file_inode(file);
        struct cifsFileInfo *cfile = file->private_data;
 
        if (!(S_ISREG(inode->i_mode)))