Lines Matching refs:i_inode
338 error = gfs2_permission(&init_user_ns, &dip->i_inode, in create_ok()
344 if (!dip->i_inode.i_nlink) in create_ok()
349 if (S_ISDIR(mode) && dip->i_inode.i_nlink == (u32)-1) in create_ok()
358 if (GFS2_SB(&dip->i_inode)->sd_args.ar_suiddir && in munge_mode_uid_gid()
359 (dip->i_inode.i_mode & S_ISUID) && in munge_mode_uid_gid()
360 !uid_eq(dip->i_inode.i_uid, GLOBAL_ROOT_UID)) { in munge_mode_uid_gid()
363 else if (!uid_eq(dip->i_inode.i_uid, current_fsuid())) in munge_mode_uid_gid()
365 inode->i_uid = dip->i_inode.i_uid; in munge_mode_uid_gid()
369 if (dip->i_inode.i_mode & S_ISGID) { in munge_mode_uid_gid()
372 inode->i_gid = dip->i_inode.i_gid; in munge_mode_uid_gid()
379 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); in alloc_dinode()
397 ip->i_inode.i_ino = ip->i_no_addr; in alloc_dinode()
437 struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); in gfs2_init_xattr()
473 di->di_major = cpu_to_be32(imajor(&ip->i_inode)); in init_dinode()
474 di->di_minor = cpu_to_be32(iminor(&ip->i_inode)); in init_dinode()
482 switch(ip->i_inode.i_mode & S_IFMT) { in init_dinode()
487 memcpy(dibh->b_data + sizeof(struct gfs2_dinode), symname, ip->i_inode.i_size); in init_dinode()
520 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); in link_dinode()
542 error = gfs2_dir_add(&dip->i_inode, name, ip, da); in link_dinode()
592 struct gfs2_sbd *sdp = GFS2_SB(&dip->i_inode); in gfs2_create_inode()
760 error = security_inode_init_security(&ip->i_inode, &dip->i_inode, name, in gfs2_create_inode()
957 if (!dip->i_inode.i_nlink) in gfs2_link()
966 if (!ip->i_inode.i_nlink) in gfs2_link()
969 if (ip->i_inode.i_nlink == (u32)-1) in gfs2_link()
1004 inc_nlink(&ip->i_inode); in gfs2_link()
1005 ip->i_inode.i_ctime = current_time(&ip->i_inode); in gfs2_link()
1048 if (IS_IMMUTABLE(&ip->i_inode) || IS_APPEND(&ip->i_inode)) in gfs2_unlink_ok()
1051 if ((dip->i_inode.i_mode & S_ISVTX) && in gfs2_unlink_ok()
1052 !uid_eq(dip->i_inode.i_uid, current_fsuid()) && in gfs2_unlink_ok()
1053 !uid_eq(ip->i_inode.i_uid, current_fsuid()) && !capable(CAP_FOWNER)) in gfs2_unlink_ok()
1056 if (IS_APPEND(&dip->i_inode)) in gfs2_unlink_ok()
1059 error = gfs2_permission(&init_user_ns, &dip->i_inode, in gfs2_unlink_ok()
1064 return gfs2_dir_check(&dip->i_inode, name, ip); in gfs2_unlink_ok()
1296 struct inode *dir = &to->i_inode; in gfs2_ok_to_move()
1304 if (dir == &this->i_inode) { in gfs2_ok_to_move()
1347 ip->i_inode.i_ctime = current_time(&ip->i_inode); in update_moved_ino()
1348 mark_inode_dirty_sync(&ip->i_inode); in update_moved_ino()
1401 if (S_ISDIR(ip->i_inode.i_mode)) { in gfs2_rename()
1452 if (ip->i_inode.i_nlink == 0) in gfs2_rename()
1468 if (nip->i_inode.i_nlink == 0) { in gfs2_rename()
1473 if (S_ISDIR(nip->i_inode.i_mode)) { in gfs2_rename()
1503 if (!ndip->i_inode.i_nlink) { in gfs2_rename()
1511 if (S_ISDIR(ip->i_inode.i_mode) && in gfs2_rename()
1512 ndip->i_inode.i_nlink == (u32)-1) { in gfs2_rename()
1621 umode_t old_mode = oip->i_inode.i_mode; in gfs2_exchange()
1622 umode_t new_mode = nip->i_inode.i_mode; in gfs2_exchange()
1675 if (oip->i_inode.i_nlink == 0 || nip->i_inode.i_nlink == 0) in gfs2_exchange()
1721 inc_nlink(&odip->i_inode); in gfs2_exchange()
1722 drop_nlink(&ndip->i_inode); in gfs2_exchange()
1724 inc_nlink(&ndip->i_inode); in gfs2_exchange()
1725 drop_nlink(&odip->i_inode); in gfs2_exchange()
1728 mark_inode_dirty(&ndip->i_inode); in gfs2_exchange()
1730 mark_inode_dirty(&odip->i_inode); in gfs2_exchange()
1794 size = (unsigned int)i_size_read(&ip->i_inode); in gfs2_get_link()
1913 ap.target = gfs2_get_inode_blocks(&ip->i_inode); in setattr_chown()