• Home
  • Raw
  • Download

Lines Matching refs:err

105 	int err = 0;  in nfsd_cross_mnt()  local
112 err = PTR_ERR(exp2); in nfsd_cross_mnt()
129 return err; in nfsd_cross_mnt()
140 __be32 err; in nfsd_lookup_dentry() local
146 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_EXEC); in nfsd_lookup_dentry()
147 if (err) in nfsd_lookup_dentry()
148 return err; in nfsd_lookup_dentry()
232 __be32 err; in nfsd_lookup() local
234 err = nfsd_lookup_dentry(rqstp, fhp, name, len, &exp, &dentry); in nfsd_lookup()
235 if (err) in nfsd_lookup()
236 return err; in nfsd_lookup()
237 err = check_nfsd_access(exp, rqstp); in nfsd_lookup()
238 if (err) in nfsd_lookup()
244 err = fh_compose(resfh, exp, dentry, fhp); in nfsd_lookup()
245 if (!err && !dentry->d_inode) in nfsd_lookup()
246 err = nfserr_noent; in nfsd_lookup()
250 return err; in nfsd_lookup()
266 __be32 err; in nfsd_setattr() local
276 err = fh_verify(rqstp, fhp, ftype, accmode); in nfsd_setattr()
277 if (err) in nfsd_setattr()
333 err = nfsd_permission(rqstp, fhp->fh_export, dentry, in nfsd_setattr()
335 if (err) in nfsd_setattr()
387 err = nfserr_notsync; in nfsd_setattr()
391 err = nfserrno(host_err); in nfsd_setattr()
396 if (!err) in nfsd_setattr()
400 return err; in nfsd_setattr()
403 err = nfserrno(host_err); in nfsd_setattr()
678 __be32 err; in nfsd_open() local
686 err = fh_verify(rqstp, fhp, type, access | NFSD_MAY_OWNER_OVERRIDE); in nfsd_open()
687 if (err) in nfsd_open()
696 err = nfserr_perm; in nfsd_open()
733 err = nfserrno(host_err); in nfsd_open()
735 return err; in nfsd_open()
757 int err; in nfsd_dosync() local
759 err = filemap_fdatawrite(inode->i_mapping); in nfsd_dosync()
760 if (err == 0 && fop && (fsync = fop->fsync)) in nfsd_dosync()
761 err = fsync(filp, dp, 0); in nfsd_dosync()
762 if (err == 0) in nfsd_dosync()
763 err = filemap_fdatawait(inode->i_mapping); in nfsd_dosync()
765 return err; in nfsd_dosync()
771 int err; in nfsd_sync() local
775 err=nfsd_dosync(filp, filp->f_path.dentry, filp->f_op); in nfsd_sync()
778 return err; in nfsd_sync()
897 __be32 err; in nfsd_vfs_read() local
900 err = nfserr_perm; in nfsd_vfs_read()
942 err = 0; in nfsd_vfs_read()
945 err = nfserrno(host_err); in nfsd_vfs_read()
947 return err; in nfsd_vfs_read()
969 __be32 err = 0; in nfsd_vfs_write() local
974 err = nfserr_perm; in nfsd_vfs_write()
1055 err = 0; in nfsd_vfs_write()
1057 err = nfserrno(host_err); in nfsd_vfs_write()
1059 return err; in nfsd_vfs_write()
1072 __be32 err; in nfsd_read() local
1075 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_read()
1077 if (err) in nfsd_read()
1079 err = nfsd_vfs_read(rqstp, fhp, file, offset, vec, vlen, count); in nfsd_read()
1081 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_READ, &file); in nfsd_read()
1082 if (err) in nfsd_read()
1084 err = nfsd_vfs_read(rqstp, fhp, file, offset, vec, vlen, count); in nfsd_read()
1088 return err; in nfsd_read()
1101 __be32 err = 0; in nfsd_write() local
1104 err = nfsd_permission(rqstp, fhp->fh_export, fhp->fh_dentry, in nfsd_write()
1106 if (err) in nfsd_write()
1108 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, cnt, in nfsd_write()
1111 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file); in nfsd_write()
1112 if (err) in nfsd_write()
1116 err = nfsd_vfs_write(rqstp, fhp, file, offset, vec, vlen, in nfsd_write()
1121 return err; in nfsd_write()
1138 __be32 err; in nfsd_commit() local
1143 err = nfsd_open(rqstp, fhp, S_IFREG, NFSD_MAY_WRITE, &file); in nfsd_commit()
1144 if (err) in nfsd_commit()
1145 return err; in nfsd_commit()
1148 err = nfserrno(nfsd_sync(file)); in nfsd_commit()
1150 err = nfserr_notsupp; in nfsd_commit()
1155 return err; in nfsd_commit()
1194 __be32 err; in nfsd_create() local
1198 err = nfserr_perm; in nfsd_create()
1201 err = nfserr_exist; in nfsd_create()
1205 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_create()
1206 if (err) in nfsd_create()
1212 err = nfserr_notdir; in nfsd_create()
1226 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in nfsd_create()
1227 if (err) in nfsd_create()
1238 err = nfserr_io; in nfsd_create()
1245 err = nfserr_exist; in nfsd_create()
1256 err = nfserr_inval; in nfsd_create()
1270 err = 0; in nfsd_create()
1291 err = nfserrno(nfsd_sync_dir(dentry)); in nfsd_create()
1297 err = err2; in nfsd_create()
1302 if (!err) in nfsd_create()
1303 err = fh_update(resfhp); in nfsd_create()
1307 return err; in nfsd_create()
1310 err = nfserrno(host_err); in nfsd_create()
1326 __be32 err; in nfsd_create_v3() local
1331 err = nfserr_perm; in nfsd_create_v3()
1334 err = nfserr_exist; in nfsd_create_v3()
1339 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_create_v3()
1340 if (err) in nfsd_create_v3()
1348 err = nfserr_notdir; in nfsd_create_v3()
1361 err = fh_compose(resfhp, fhp->fh_export, dchild, fhp); in nfsd_create_v3()
1362 if (err) in nfsd_create_v3()
1380 err = 0; in nfsd_create_v3()
1385 err = nfserr_exist; in nfsd_create_v3()
1408 err = nfserr_exist; in nfsd_create_v3()
1423 err = nfserrno(nfsd_sync_dir(dentry)); in nfsd_create_v3()
1441 err = err2; in nfsd_create_v3()
1447 if (!err) in nfsd_create_v3()
1448 err = fh_update(resfhp); in nfsd_create_v3()
1454 return err; in nfsd_create_v3()
1457 err = nfserrno(host_err); in nfsd_create_v3()
1473 __be32 err; in nfsd_readlink() local
1476 err = fh_verify(rqstp, fhp, S_IFLNK, NFSD_MAY_NOP); in nfsd_readlink()
1477 if (err) in nfsd_readlink()
1483 err = nfserr_inval; in nfsd_readlink()
1499 err = 0; in nfsd_readlink()
1501 return err; in nfsd_readlink()
1504 err = nfserrno(host_err); in nfsd_readlink()
1520 __be32 err, cerr; in nfsd_symlink() local
1523 err = nfserr_noent; in nfsd_symlink()
1526 err = nfserr_exist; in nfsd_symlink()
1530 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_symlink()
1531 if (err) in nfsd_symlink()
1561 err = nfserrno(host_err); in nfsd_symlink()
1568 if (err==0) err = cerr; in nfsd_symlink()
1570 return err; in nfsd_symlink()
1573 err = nfserrno(host_err); in nfsd_symlink()
1587 __be32 err; in nfsd_link() local
1590 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_link()
1591 if (err) in nfsd_link()
1593 err = fh_verify(rqstp, tfhp, -S_IFDIR, NFSD_MAY_NOP); in nfsd_link()
1594 if (err) in nfsd_link()
1597 err = nfserr_perm; in nfsd_link()
1600 err = nfserr_exist; in nfsd_link()
1618 err = nfserrno(host_err); in nfsd_link()
1624 err = nfserrno(nfsd_sync_dir(ddir)); in nfsd_link()
1627 err = 0; in nfsd_link()
1630 err = nfserr_acces; in nfsd_link()
1632 err = nfserrno(host_err); in nfsd_link()
1640 return err; in nfsd_link()
1643 err = nfserrno(host_err); in nfsd_link()
1657 __be32 err; in nfsd_rename() local
1660 err = fh_verify(rqstp, ffhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_rename()
1661 if (err) in nfsd_rename()
1663 err = fh_verify(rqstp, tfhp, S_IFDIR, NFSD_MAY_CREATE); in nfsd_rename()
1664 if (err) in nfsd_rename()
1673 err = (rqstp->rq_vers == 2) ? nfserr_acces : nfserr_xdev; in nfsd_rename()
1677 err = nfserr_perm; in nfsd_rename()
1736 err = nfserrno(host_err); in nfsd_rename()
1748 return err; in nfsd_rename()
1761 __be32 err; in nfsd_unlink() local
1764 err = nfserr_acces; in nfsd_unlink()
1767 err = fh_verify(rqstp, fhp, S_IFDIR, NFSD_MAY_REMOVE); in nfsd_unlink()
1768 if (err) in nfsd_unlink()
1782 err = nfserr_noent; in nfsd_unlink()
1815 err = nfserrno(host_err); in nfsd_unlink()
1817 return err; in nfsd_unlink()
1882 cdp->err = nfserr_eof; /* will be cleared on successful read */ in nfsd_buffered_readdir()
1906 if (cdp->err != nfs_ok) in nfsd_buffered_readdir()
1924 return cdp->err; in nfsd_buffered_readdir()
1935 __be32 err; in nfsd_readdir() local
1939 err = nfsd_open(rqstp, fhp, S_IFDIR, NFSD_MAY_READ, &file); in nfsd_readdir()
1940 if (err) in nfsd_readdir()
1945 err = nfserrno((int)offset); in nfsd_readdir()
1949 err = nfsd_buffered_readdir(file, func, cdp, offsetp); in nfsd_readdir()
1951 if (err == nfserr_eof || err == nfserr_toosmall) in nfsd_readdir()
1952 err = nfs_ok; /* can still be found in ->err */ in nfsd_readdir()
1956 return err; in nfsd_readdir()
1966 __be32 err = fh_verify(rqstp, fhp, 0, NFSD_MAY_NOP | access); in nfsd_statfs() local
1967 if (!err && vfs_statfs(fhp->fh_dentry,stat)) in nfsd_statfs()
1968 err = nfserr_io; in nfsd_statfs()
1969 return err; in nfsd_statfs()
1985 int err; in nfsd_permission() local
2051 err = inode_permission(inode, acc & (MAY_READ|MAY_WRITE|MAY_EXEC)); in nfsd_permission()
2054 if (err == -EACCES && S_ISREG(inode->i_mode) && in nfsd_permission()
2056 err = inode_permission(inode, MAY_EXEC); in nfsd_permission()
2058 return err? nfserrno(err) : 0; in nfsd_permission()