Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 349452
b: refs/heads/master
c: ab22541
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Jan 30, 2013
1 parent c3a7713 commit aa3ae09
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 65436ec0c8e344d9b23302b686e418f2a7b7cf7b
refs/heads/master: ab225417825963b6dc66be7ea80f94ac1378dfdf
20 changes: 20 additions & 0 deletions trunk/fs/nfs/namespace.c
Original file line number Diff line number Diff line change
Expand Up @@ -177,11 +177,31 @@ struct vfsmount *nfs_d_automount(struct path *path)
return mnt;
}

static int
nfs_namespace_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *stat)
{
if (NFS_FH(dentry->d_inode)->size != 0)
return nfs_getattr(mnt, dentry, stat);
generic_fillattr(dentry->d_inode, stat);
return 0;
}

static int
nfs_namespace_setattr(struct dentry *dentry, struct iattr *attr)
{
if (NFS_FH(dentry->d_inode)->size != 0)
return nfs_setattr(dentry, attr);
return -EACCES;
}

const struct inode_operations nfs_mountpoint_inode_operations = {
.getattr = nfs_getattr,
.setattr = nfs_setattr,
};

const struct inode_operations nfs_referral_inode_operations = {
.getattr = nfs_namespace_getattr,
.setattr = nfs_namespace_setattr,
};

static void nfs_expire_automounts(struct work_struct *work)
Expand Down

0 comments on commit aa3ae09

Please sign in to comment.