diff options
Diffstat (limited to 'fs/afs/file.c')
-rw-r--r-- | fs/afs/file.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/afs/file.c b/fs/afs/file.c index 101bbb8c0d8b..ae256498f4f7 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -50,6 +50,7 @@ int afs_open(struct inode *inode, struct file *file) { struct afs_vnode *vnode = AFS_FS_I(inode); struct key *key; + int ret; _enter("{%x:%x},", vnode->fid.vid, vnode->fid.vnode); @@ -59,6 +60,12 @@ int afs_open(struct inode *inode, struct file *file) return PTR_ERR(key); } + ret = afs_validate(vnode, key); + if (ret < 0) { + _leave(" = %d [val]", ret); + return ret; + } + file->private_data = key; _leave(" = 0"); return 0; |