Skip to content

Commit

Permalink
[PATCH] struct path: convert ncpfs
Browse files Browse the repository at this point in the history
Signed-off-by: Josef Sipek <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Josef Sipek authored and Linus Torvalds committed Dec 8, 2006
1 parent 1750604 commit 92e5bae
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions fs/ncpfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ static time_t ncp_obtain_mtime(struct dentry *dentry)

static int ncp_readdir(struct file *filp, void *dirent, filldir_t filldir)
{
struct dentry *dentry = filp->f_dentry;
struct dentry *dentry = filp->f_path.dentry;
struct inode *inode = dentry->d_inode;
struct page *page = NULL;
struct ncp_server *server = NCP_SERVER(inode);
Expand Down Expand Up @@ -554,7 +554,7 @@ static int
ncp_fill_cache(struct file *filp, void *dirent, filldir_t filldir,
struct ncp_cache_control *ctrl, struct ncp_entry_info *entry)
{
struct dentry *newdent, *dentry = filp->f_dentry;
struct dentry *newdent, *dentry = filp->f_path.dentry;
struct inode *newino, *inode = dentry->d_inode;
struct ncp_cache_control ctl = *ctrl;
struct qstr qname;
Expand Down Expand Up @@ -649,7 +649,7 @@ static void
ncp_read_volume_list(struct file *filp, void *dirent, filldir_t filldir,
struct ncp_cache_control *ctl)
{
struct dentry *dentry = filp->f_dentry;
struct dentry *dentry = filp->f_path.dentry;
struct inode *inode = dentry->d_inode;
struct ncp_server *server = NCP_SERVER(inode);
struct ncp_volume_info info;
Expand Down Expand Up @@ -685,7 +685,7 @@ static void
ncp_do_readdir(struct file *filp, void *dirent, filldir_t filldir,
struct ncp_cache_control *ctl)
{
struct dentry *dentry = filp->f_dentry;
struct dentry *dentry = filp->f_path.dentry;
struct inode *dir = dentry->d_inode;
struct ncp_server *server = NCP_SERVER(dir);
struct nw_search_sequence seq;
Expand Down
4 changes: 2 additions & 2 deletions fs/ncpfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ int ncp_make_open(struct inode *inode, int right)
static ssize_t
ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
{
struct dentry *dentry = file->f_dentry;
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
size_t already_read = 0;
off_t pos;
Expand Down Expand Up @@ -182,7 +182,7 @@ ncp_file_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)
static ssize_t
ncp_file_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos)
{
struct dentry *dentry = file->f_dentry;
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
size_t already_written = 0;
off_t pos;
Expand Down
4 changes: 2 additions & 2 deletions fs/ncpfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
if (!ncp_filp)
goto out;
error = -ENOTSOCK;
sock_inode = ncp_filp->f_dentry->d_inode;
sock_inode = ncp_filp->f_path.dentry->d_inode;
if (!S_ISSOCK(sock_inode->i_mode))
goto out_fput;
sock = SOCKET_I(sock_inode);
Expand Down Expand Up @@ -504,7 +504,7 @@ static int ncp_fill_super(struct super_block *sb, void *raw_data, int silent)
if (!server->info_filp)
goto out_fput;
error = -ENOTSOCK;
sock_inode = server->info_filp->f_dentry->d_inode;
sock_inode = server->info_filp->f_path.dentry->d_inode;
if (!S_ISSOCK(sock_inode->i_mode))
goto out_fput2;
info_sock = SOCKET_I(sock_inode);
Expand Down
8 changes: 4 additions & 4 deletions fs/ncpfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ static int
ncp_get_fs_info(struct ncp_server * server, struct file *file,
struct ncp_fs_info __user *arg)
{
struct inode *inode = file->f_dentry->d_inode;
struct inode *inode = file->f_path.dentry->d_inode;
struct ncp_fs_info info;

if ((file_permission(file, MAY_WRITE) != 0)
Expand Down Expand Up @@ -65,7 +65,7 @@ static int
ncp_get_fs_info_v2(struct ncp_server * server, struct file *file,
struct ncp_fs_info_v2 __user * arg)
{
struct inode *inode = file->f_dentry->d_inode;
struct inode *inode = file->f_path.dentry->d_inode;
struct ncp_fs_info_v2 info2;

if ((file_permission(file, MAY_WRITE) != 0)
Expand Down Expand Up @@ -136,7 +136,7 @@ static int
ncp_get_compat_fs_info_v2(struct ncp_server * server, struct file *file,
struct compat_ncp_fs_info_v2 __user * arg)
{
struct inode *inode = file->f_dentry->d_inode;
struct inode *inode = file->f_path.dentry->d_inode;
struct compat_ncp_fs_info_v2 info2;

if ((file_permission(file, MAY_WRITE) != 0)
Expand Down Expand Up @@ -824,7 +824,7 @@ int ncp_ioctl(struct inode *inode, struct file *filp,
#ifdef CONFIG_COMPAT
long ncp_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
struct inode *inode = file->f_dentry->d_inode;
struct inode *inode = file->f_path.dentry->d_inode;
int ret;

lock_kernel();
Expand Down
4 changes: 2 additions & 2 deletions fs/ncpfs/mmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static struct page* ncp_file_mmap_nopage(struct vm_area_struct *area,
unsigned long address, int *type)
{
struct file *file = area->vm_file;
struct dentry *dentry = file->f_dentry;
struct dentry *dentry = file->f_path.dentry;
struct inode *inode = dentry->d_inode;
struct page* page;
char *pg_addr;
Expand Down Expand Up @@ -106,7 +106,7 @@ static struct vm_operations_struct ncp_file_mmap =
/* This is used for a general mmap of a ncp file */
int ncp_mmap(struct file *file, struct vm_area_struct *vma)
{
struct inode *inode = file->f_dentry->d_inode;
struct inode *inode = file->f_path.dentry->d_inode;

DPRINTK("ncp_mmap: called\n");

Expand Down

0 comments on commit 92e5bae

Please sign in to comment.