Lines Matching refs:nlink
217 (is_dir || lowerstat.nlink == 1))) {
259 * correct link count. nlink=1 seems to pacify 'find' and
263 stat->nlink = 1;
267 * Overlay inode nlink counts the union of the upper hardlinks
272 stat->nlink = dentry->d_inode->i_nlink;
684 * With inodes index enabled, an overlay inode nlink counts the union of upper
686 * upper inode, the following nlink modifying operations can happen:
692 * For the first, copy up case, the union nlink does not change, whether the
693 * operation succeeds or fails, but the upper inode nlink may change.
694 * Therefore, before copy up, we store the union nlink value relative to the
695 * lower inode nlink in the index inode xattr trusted.overlay.nlink.
697 * For the second, upper hardlink case, the union nlink should be incremented
698 * or decremented IFF the operation succeeds, aligned with nlink change of the
699 * upper inode. Therefore, before link/unlink/rename, we store the union nlink
700 * value relative to the upper inode nlink in the index inode.
704 * upper inode where the nlink xattr can be stored before the copied up upper
710 * On-disk format for indexed nlink:
712 * nlink relative to the upper inode - "U[+-]NUM"
713 * nlink relative to the lower inode - "L[+-]NUM"
749 int nlink;
770 nlink = d_inode(buf[0] == 'L' ? lowerdentry : upperdentry)->i_nlink;
771 nlink += nlink_diff;
773 if (nlink <= 0)
776 return nlink;
779 pr_warn_ratelimited("failed to get index nlink (%pd2, err=%i)\n",
979 unsigned int nlink = is_dir ? 1 : realinode->i_nlink;
1001 /* Recalculate nlink for non-dir due to indexing */
1003 nlink = ovl_get_nlink(ofs, lowerdentry, upperdentry,
1004 nlink);
1005 set_nlink(inode, nlink);