inode->i_op is never NULL
We used to have rather schizophrenic set of checks for NULL ->i_op even though it had been eliminated years ago. You'd need to go out of your way to set it to NULL explicitly _and_ a bunch of code would die on such inodes anyway. After killing two remaining places that still did that bogosity, all that crap can go away. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -1211,7 +1211,7 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
||||
dirp = dentry->d_inode;
|
||||
|
||||
err = nfserr_notdir;
|
||||
if(!dirp->i_op || !dirp->i_op->lookup)
|
||||
if (!dirp->i_op->lookup)
|
||||
goto out;
|
||||
/*
|
||||
* Check whether the response file handle has been verified yet.
|
||||
@@ -1347,7 +1347,7 @@ nfsd_create_v3(struct svc_rqst *rqstp, struct svc_fh *fhp,
|
||||
/* Get all the sanity checks out of the way before
|
||||
* we lock the parent. */
|
||||
err = nfserr_notdir;
|
||||
if(!dirp->i_op || !dirp->i_op->lookup)
|
||||
if (!dirp->i_op->lookup)
|
||||
goto out;
|
||||
fh_lock_nested(fhp, I_MUTEX_PARENT);
|
||||
|
||||
@@ -1482,7 +1482,7 @@ nfsd_readlink(struct svc_rqst *rqstp, struct svc_fh *fhp, char *buf, int *lenp)
|
||||
inode = dentry->d_inode;
|
||||
|
||||
err = nfserr_inval;
|
||||
if (!inode->i_op || !inode->i_op->readlink)
|
||||
if (!inode->i_op->readlink)
|
||||
goto out;
|
||||
|
||||
touch_atime(fhp->fh_export->ex_path.mnt, dentry);
|
||||
@@ -2162,7 +2162,7 @@ nfsd_set_posix_acl(struct svc_fh *fhp, int type, struct posix_acl *acl)
|
||||
size_t size;
|
||||
int error;
|
||||
|
||||
if (!IS_POSIXACL(inode) || !inode->i_op ||
|
||||
if (!IS_POSIXACL(inode) ||
|
||||
!inode->i_op->setxattr || !inode->i_op->removexattr)
|
||||
return -EOPNOTSUPP;
|
||||
switch(type) {
|
||||
|
Reference in New Issue
Block a user