{"action":"created","comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments/70455745","id":70455745,"diff_hunk":"@@ -746,9 +749,10 @@ zfs_link_create(zfs_dirlock_t *dl, znode_t *zp, dmu_tx_t *tx, int flag)\n \t\t\tmutex_exit(&zp->z_lock);\n \t\t\treturn (SET_ERROR(ENOENT));\n \t\t}\n-\t\tzp->z_links++;\n+\t\tinc_nlink(ZTOI(zp));","path":"module/zfs/zfs_dir.c","position":47,"original_position":47,"commit_id":"47c3348466413273aed210a965f467cb7b9cf598","original_commit_id":"79322dd04a2060dae7f7ec7689e2482283709492","user":{"login":"chrisrd","id":1211482,"avatar_url":"https://avatars.githubusercontent.com/u/1211482?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisrd","html_url":"https://github.com/chrisrd","followers_url":"https://api.github.com/users/chrisrd/followers","following_url":"https://api.github.com/users/chrisrd/following{/other_user}","gists_url":"https://api.github.com/users/chrisrd/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisrd/subscriptions","organizations_url":"https://api.github.com/users/chrisrd/orgs","repos_url":"https://api.github.com/users/chrisrd/repos","events_url":"https://api.github.com/users/chrisrd/events{/privacy}","received_events_url":"https://api.github.com/users/chrisrd/received_events","type":"User","site_admin":false},"body":"The `I_LINKABLE` warning only triggers if `i_nlink == 0` prior to the increment and is seemingly there to avoid a potential security hole: http://comments.gmane.org/gmane.linux.file-systems/77269\r\n\r\nThe inode is initialised with `i_nlink = 1` per below, so it's changing to zero between initialisation and here, and I'm trying to work out why that's occurring and if it's reasonable or not.\r\n\r\n```\r\n+ zfs_create(dir, dname(dentry), vap, 0, mode, &ip, cr, 0, NULL);\r\n  + zfs_mknode(dzp, vap, tx, cr, 0, &zp, &acl_ids);\r\n  | + zfs_znode_alloc(zsb, db, 0, obj_type, obj, sa_hdl, ZTOI(dzp));\r\n  |   + new_inode(zsb->z_sb);\r\n  |     + new_inode_pseudo(sb);\r\n  |       + alloc_inode(sb);\r\n  |         + inode_init_always(sb, inode)\r\n  |           + inode->__i_nlink = 1;\r\n  + zfs_link_create(dl, zp, tx, ZNEW);\r\n    + inc_nlink(ZTOI(zp));              /* I_LINKABLE warning on i_nlink == 0 */\r\n```\r\n","created_at":"2016-07-12T14:58:49Z","updated_at":"2016-07-12T14:58:50Z","html_url":"https://github.com/zfsonlinux/zfs/pull/4838#discussion_r70455745","pull_request_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838","_links":{"self":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments/70455745"},"html":{"href":"https://github.com/zfsonlinux/zfs/pull/4838#discussion_r70455745"},"pull_request":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838"}}},"pull_request":{"url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838","id":76908734,"html_url":"https://github.com/zfsonlinux/zfs/pull/4838","diff_url":"https://github.com/zfsonlinux/zfs/pull/4838.diff","patch_url":"https://github.com/zfsonlinux/zfs/pull/4838.patch","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4838","number":4838,"state":"open","locked":false,"title":"Kill znode->z_links field","user":{"login":"chrisrd","id":1211482,"avatar_url":"https://avatars.githubusercontent.com/u/1211482?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisrd","html_url":"https://github.com/chrisrd","followers_url":"https://api.github.com/users/chrisrd/followers","following_url":"https://api.github.com/users/chrisrd/following{/other_user}","gists_url":"https://api.github.com/users/chrisrd/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisrd/subscriptions","organizations_url":"https://api.github.com/users/chrisrd/orgs","repos_url":"https://api.github.com/users/chrisrd/repos","events_url":"https://api.github.com/users/chrisrd/events{/privacy}","received_events_url":"https://api.github.com/users/chrisrd/received_events","type":"User","site_admin":false},"body":"Use native inode->i_nlink instead of znode->z_links.\r\n\r\nSigned-off-by: Chris Dunlop <chris@onthe.net.au>","created_at":"2016-07-11T07:15:20Z","updated_at":"2016-07-12T14:58:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"72f5a8a68ad6f068bf2a096b42b4b78efcd7f7c0","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838/commits","review_comments_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838/comments","review_comment_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4838/comments","statuses_url":"https://api.github.com/repos/zfsonlinux/zfs/statuses/47c3348466413273aed210a965f467cb7b9cf598","head":{"label":"chrisrd:zol-4827-nlinks","ref":"zol-4827-nlinks","sha":"47c3348466413273aed210a965f467cb7b9cf598","user":{"login":"chrisrd","id":1211482,"avatar_url":"https://avatars.githubusercontent.com/u/1211482?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisrd","html_url":"https://github.com/chrisrd","followers_url":"https://api.github.com/users/chrisrd/followers","following_url":"https://api.github.com/users/chrisrd/following{/other_user}","gists_url":"https://api.github.com/users/chrisrd/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisrd/subscriptions","organizations_url":"https://api.github.com/users/chrisrd/orgs","repos_url":"https://api.github.com/users/chrisrd/repos","events_url":"https://api.github.com/users/chrisrd/events{/privacy}","received_events_url":"https://api.github.com/users/chrisrd/received_events","type":"User","site_admin":false},"repo":{"id":5636864,"name":"zfs","full_name":"chrisrd/zfs","owner":{"login":"chrisrd","id":1211482,"avatar_url":"https://avatars.githubusercontent.com/u/1211482?v=3","gravatar_id":"","url":"https://api.github.com/users/chrisrd","html_url":"https://github.com/chrisrd","followers_url":"https://api.github.com/users/chrisrd/followers","following_url":"https://api.github.com/users/chrisrd/following{/other_user}","gists_url":"https://api.github.com/users/chrisrd/gists{/gist_id}","starred_url":"https://api.github.com/users/chrisrd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chrisrd/subscriptions","organizations_url":"https://api.github.com/users/chrisrd/orgs","repos_url":"https://api.github.com/users/chrisrd/repos","events_url":"https://api.github.com/users/chrisrd/events{/privacy}","received_events_url":"https://api.github.com/users/chrisrd/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/chrisrd/zfs","description":"Native ZFS for Linux","fork":true,"url":"https://api.github.com/repos/chrisrd/zfs","forks_url":"https://api.github.com/repos/chrisrd/zfs/forks","keys_url":"https://api.github.com/repos/chrisrd/zfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/chrisrd/zfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/chrisrd/zfs/teams","hooks_url":"https://api.github.com/repos/chrisrd/zfs/hooks","issue_events_url":"https://api.github.com/repos/chrisrd/zfs/issues/events{/number}","events_url":"https://api.github.com/repos/chrisrd/zfs/events","assignees_url":"https://api.github.com/repos/chrisrd/zfs/assignees{/user}","branches_url":"https://api.github.com/repos/chrisrd/zfs/branches{/branch}","tags_url":"https://api.github.com/repos/chrisrd/zfs/tags","blobs_url":"https://api.github.com/repos/chrisrd/zfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/chrisrd/zfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/chrisrd/zfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/chrisrd/zfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/chrisrd/zfs/statuses/{sha}","languages_url":"https://api.github.com/repos/chrisrd/zfs/languages","stargazers_url":"https://api.github.com/repos/chrisrd/zfs/stargazers","contributors_url":"https://api.github.com/repos/chrisrd/zfs/contributors","subscribers_url":"https://api.github.com/repos/chrisrd/zfs/subscribers","subscription_url":"https://api.github.com/repos/chrisrd/zfs/subscription","commits_url":"https://api.github.com/repos/chrisrd/zfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/chrisrd/zfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/chrisrd/zfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/chrisrd/zfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/chrisrd/zfs/contents/{+path}","compare_url":"https://api.github.com/repos/chrisrd/zfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/chrisrd/zfs/merges","archive_url":"https://api.github.com/repos/chrisrd/zfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/chrisrd/zfs/downloads","issues_url":"https://api.github.com/repos/chrisrd/zfs/issues{/number}","pulls_url":"https://api.github.com/repos/chrisrd/zfs/pulls{/number}","milestones_url":"https://api.github.com/repos/chrisrd/zfs/milestones{/number}","notifications_url":"https://api.github.com/repos/chrisrd/zfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/chrisrd/zfs/labels{/name}","releases_url":"https://api.github.com/repos/chrisrd/zfs/releases{/id}","deployments_url":"https://api.github.com/repos/chrisrd/zfs/deployments","created_at":"2012-09-01T04:19:53Z","updated_at":"2015-05-03T13:46:08Z","pushed_at":"2016-07-11T10:06:28Z","git_url":"git://github.com/chrisrd/zfs.git","ssh_url":"git@github.com:chrisrd/zfs.git","clone_url":"https://github.com/chrisrd/zfs.git","svn_url":"https://github.com/chrisrd/zfs","homepage":"http://zfsonlinux.org/","size":29759,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"zfsonlinux:master","ref":"master","sha":"5c27b296055301f13103ca0aa98c2ded01dcd9a0","user":{"login":"zfsonlinux","id":575083,"avatar_url":"https://avatars.githubusercontent.com/u/575083?v=3","gravatar_id":"","url":"https://api.github.com/users/zfsonlinux","html_url":"https://github.com/zfsonlinux","followers_url":"https://api.github.com/users/zfsonlinux/followers","following_url":"https://api.github.com/users/zfsonlinux/following{/other_user}","gists_url":"https://api.github.com/users/zfsonlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/zfsonlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfsonlinux/subscriptions","organizations_url":"https://api.github.com/users/zfsonlinux/orgs","repos_url":"https://api.github.com/users/zfsonlinux/repos","events_url":"https://api.github.com/users/zfsonlinux/events{/privacy}","received_events_url":"https://api.github.com/users/zfsonlinux/received_events","type":"Organization","site_admin":false},"repo":{"id":437011,"name":"zfs","full_name":"zfsonlinux/zfs","owner":{"login":"zfsonlinux","id":575083,"avatar_url":"https://avatars.githubusercontent.com/u/575083?v=3","gravatar_id":"","url":"https://api.github.com/users/zfsonlinux","html_url":"https://github.com/zfsonlinux","followers_url":"https://api.github.com/users/zfsonlinux/followers","following_url":"https://api.github.com/users/zfsonlinux/following{/other_user}","gists_url":"https://api.github.com/users/zfsonlinux/gists{/gist_id}","starred_url":"https://api.github.com/users/zfsonlinux/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zfsonlinux/subscriptions","organizations_url":"https://api.github.com/users/zfsonlinux/orgs","repos_url":"https://api.github.com/users/zfsonlinux/repos","events_url":"https://api.github.com/users/zfsonlinux/events{/privacy}","received_events_url":"https://api.github.com/users/zfsonlinux/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zfsonlinux/zfs","description":"ZFS on Linux - the official OpenZFS implementation for Linux.","fork":false,"url":"https://api.github.com/repos/zfsonlinux/zfs","forks_url":"https://api.github.com/repos/zfsonlinux/zfs/forks","keys_url":"https://api.github.com/repos/zfsonlinux/zfs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zfsonlinux/zfs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zfsonlinux/zfs/teams","hooks_url":"https://api.github.com/repos/zfsonlinux/zfs/hooks","issue_events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/events{/number}","events_url":"https://api.github.com/repos/zfsonlinux/zfs/events","assignees_url":"https://api.github.com/repos/zfsonlinux/zfs/assignees{/user}","branches_url":"https://api.github.com/repos/zfsonlinux/zfs/branches{/branch}","tags_url":"https://api.github.com/repos/zfsonlinux/zfs/tags","blobs_url":"https://api.github.com/repos/zfsonlinux/zfs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zfsonlinux/zfs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zfsonlinux/zfs/git/refs{/sha}","trees_url":"https://api.github.com/repos/zfsonlinux/zfs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zfsonlinux/zfs/statuses/{sha}","languages_url":"https://api.github.com/repos/zfsonlinux/zfs/languages","stargazers_url":"https://api.github.com/repos/zfsonlinux/zfs/stargazers","contributors_url":"https://api.github.com/repos/zfsonlinux/zfs/contributors","subscribers_url":"https://api.github.com/repos/zfsonlinux/zfs/subscribers","subscription_url":"https://api.github.com/repos/zfsonlinux/zfs/subscription","commits_url":"https://api.github.com/repos/zfsonlinux/zfs/commits{/sha}","git_commits_url":"https://api.github.com/repos/zfsonlinux/zfs/git/commits{/sha}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/comments{/number}","issue_comment_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments{/number}","contents_url":"https://api.github.com/repos/zfsonlinux/zfs/contents/{+path}","compare_url":"https://api.github.com/repos/zfsonlinux/zfs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zfsonlinux/zfs/merges","archive_url":"https://api.github.com/repos/zfsonlinux/zfs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zfsonlinux/zfs/downloads","issues_url":"https://api.github.com/repos/zfsonlinux/zfs/issues{/number}","pulls_url":"https://api.github.com/repos/zfsonlinux/zfs/pulls{/number}","milestones_url":"https://api.github.com/repos/zfsonlinux/zfs/milestones{/number}","notifications_url":"https://api.github.com/repos/zfsonlinux/zfs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/labels{/name}","releases_url":"https://api.github.com/repos/zfsonlinux/zfs/releases{/id}","deployments_url":"https://api.github.com/repos/zfsonlinux/zfs/deployments","created_at":"2009-12-14T20:20:34Z","updated_at":"2016-07-12T04:53:58Z","pushed_at":"2016-07-12T14:26:32Z","git_url":"git://github.com/zfsonlinux/zfs.git","ssh_url":"git@github.com:zfsonlinux/zfs.git","clone_url":"https://github.com/zfsonlinux/zfs.git","svn_url":"https://github.com/zfsonlinux/zfs","homepage":"http://zfsonlinux.org/","size":55752,"stargazers_count":1875,"watchers_count":1875,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":477,"mirror_url":null,"open_issues_count":1062,"forks":477,"open_issues":1062,"watchers":1875,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838"},"html":{"href":"https://github.com/zfsonlinux/zfs/pull/4838"},"issue":{"href":"https://api.github.com/repos/zfsonlinux/zfs/issues/4838"},"comments":{"href":"https://api.github.com/repos/zfsonlinux/zfs/issues/4838/comments"},"review_comments":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838/comments"},"review_comment":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zfsonlinux/zfs/pulls/4838/commits"},"statuses":{"href":"https://api.github.com/repos/zfsonlinux/zfs/statuses/47c3348466413273aed210a965f467cb7b9cf598"}}}}
{"actor":{"display_login":"chrisrd"}}