Lines Matching refs:iap
301 nfsd_sanitize_attrs(struct inode *inode, struct iattr *iap) in nfsd_sanitize_attrs() argument
304 if (iap->ia_valid & ATTR_MODE) { in nfsd_sanitize_attrs()
305 iap->ia_mode &= S_IALLUGO; in nfsd_sanitize_attrs()
306 iap->ia_mode |= (inode->i_mode & ~S_IALLUGO); in nfsd_sanitize_attrs()
311 ((iap->ia_valid & ATTR_UID) || (iap->ia_valid & ATTR_GID))) { in nfsd_sanitize_attrs()
312 iap->ia_valid |= ATTR_KILL_PRIV; in nfsd_sanitize_attrs()
313 if (iap->ia_valid & ATTR_MODE) { in nfsd_sanitize_attrs()
315 iap->ia_mode &= ~S_ISUID; in nfsd_sanitize_attrs()
316 if (iap->ia_mode & S_IXGRP) in nfsd_sanitize_attrs()
317 iap->ia_mode &= ~S_ISGID; in nfsd_sanitize_attrs()
320 iap->ia_valid |= (ATTR_KILL_SUID | ATTR_KILL_SGID); in nfsd_sanitize_attrs()
327 struct iattr *iap) in nfsd_get_write_access() argument
332 if (iap->ia_size < inode->i_size) { in nfsd_get_write_access()
345 host_err = locks_verify_truncate(inode, NULL, iap->ia_size); in nfsd_get_write_access()
360 nfsd_setattr(struct svc_rqst *rqstp, struct svc_fh *fhp, struct iattr *iap, in nfsd_setattr() argument
370 bool size_change = (iap->ia_valid & ATTR_SIZE); in nfsd_setattr()
372 if (iap->ia_valid & ATTR_SIZE) { in nfsd_setattr()
384 if (iap->ia_valid & (ATTR_ATIME | ATTR_MTIME)) { in nfsd_setattr()
386 if (!(iap->ia_valid & (ATTR_ATIME_SET | ATTR_MTIME_SET))) in nfsd_setattr()
408 iap->ia_valid &= ~ATTR_MODE; in nfsd_setattr()
410 if (!iap->ia_valid) in nfsd_setattr()
413 nfsd_sanitize_attrs(inode, iap); in nfsd_setattr()
426 err = nfsd_get_write_access(rqstp, fhp, iap); in nfsd_setattr()
442 .ia_size = iap->ia_size, in nfsd_setattr()
448 iap->ia_valid &= ~ATTR_SIZE; in nfsd_setattr()
455 if ((iap->ia_valid & ~ATTR_MTIME) == 0) in nfsd_setattr()
459 iap->ia_valid |= ATTR_CTIME; in nfsd_setattr()
460 host_err = notify_change(dentry, iap, NULL); in nfsd_setattr()
1106 struct iattr *iap) in nfsd_create_setattr() argument
1111 iap->ia_valid &= ~ATTR_MODE; in nfsd_create_setattr()
1118 iap->ia_valid &= ~(ATTR_UID|ATTR_GID); in nfsd_create_setattr()
1119 if (iap->ia_valid) in nfsd_create_setattr()
1120 return nfsd_setattr(rqstp, resfhp, iap, 0, (time_t)0); in nfsd_create_setattr()
1134 nfsd_check_ignore_resizing(struct iattr *iap) in nfsd_check_ignore_resizing() argument
1136 if ((iap->ia_valid & ATTR_SIZE) && (iap->ia_size == 0)) in nfsd_check_ignore_resizing()
1137 iap->ia_valid &= ~ATTR_SIZE; in nfsd_check_ignore_resizing()
1143 char *fname, int flen, struct iattr *iap, in nfsd_create_locked() argument
1167 if (!(iap->ia_valid & ATTR_MODE)) in nfsd_create_locked()
1168 iap->ia_mode = 0; in nfsd_create_locked()
1169 iap->ia_mode = (iap->ia_mode & S_IALLUGO) | type; in nfsd_create_locked()
1175 host_err = vfs_create(dirp, dchild, iap->ia_mode, true); in nfsd_create_locked()
1177 nfsd_check_ignore_resizing(iap); in nfsd_create_locked()
1180 host_err = vfs_mkdir(dirp, dchild, iap->ia_mode); in nfsd_create_locked()
1208 host_err = vfs_mknod(dirp, dchild, iap->ia_mode, rdev); in nfsd_create_locked()
1218 err = nfsd_create_setattr(rqstp, resfhp, iap); in nfsd_create_locked()
1251 char *fname, int flen, struct iattr *iap, in nfsd_create() argument
1284 return nfsd_create_locked(rqstp, fhp, fname, flen, iap, type, in nfsd_create()
1295 char *fname, int flen, struct iattr *iap, in do_nfsd_create() argument
1311 if (!(iap->ia_valid & ATTR_MODE)) in do_nfsd_create()
1312 iap->ia_mode = 0; in do_nfsd_create()
1371 *truncp = (iap->ia_valid & ATTR_SIZE) && !iap->ia_size; in do_nfsd_create()
1374 iap->ia_valid &= ATTR_SIZE; in do_nfsd_create()
1403 host_err = vfs_create(dirp, dchild, iap->ia_mode, true); in do_nfsd_create()
1411 nfsd_check_ignore_resizing(iap); in do_nfsd_create()
1415 iap->ia_valid = ATTR_MTIME|ATTR_ATIME in do_nfsd_create()
1418 iap->ia_mtime.tv_sec = v_mtime; in do_nfsd_create()
1419 iap->ia_atime.tv_sec = v_atime; in do_nfsd_create()
1420 iap->ia_mtime.tv_nsec = 0; in do_nfsd_create()
1421 iap->ia_atime.tv_nsec = 0; in do_nfsd_create()
1425 err = nfsd_create_setattr(rqstp, resfhp, iap); in do_nfsd_create()