*参照元 [#zac03068]
#backlinks

*説明 [#ed979496]
-パス: [[linux-2.6.33/fs/file_table.c]]

-FIXME: これは何?
--説明


**引数 [#k711277f]
-struct file *file
--ファイル
--[[linux-2.6.33/file]]


**返り値 [#p830bbce]
-なし


**参考 [#o9408d9f]


*実装 [#z4606c25]
 /* __fput is called from task context when aio completion releases the last
  * last use of a struct file *.  Do not use otherwise.
  */
 void __fput(struct file *file)
 {
 	struct dentry *dentry = file->f_path.dentry;
 	struct vfsmount *mnt = file->f_path.mnt;
 	struct inode *inode = dentry->d_inode;
 
-file->fpath は struct path 型
--[[linux-2.6.33/path]]
-
--[[linux-2.6.33/dentry]]
-
--[[linux-2.6.33/mnt]]
-
--[[linux-2.6.33/inode]]

 	might_sleep();
 
-
--[[linux-2.6.33/might_sleep()]]

 	fsnotify_close(file);
-
--[[linux-2.6.33/fsnotify_close()]]

 	/*
 	 * The function eventpoll_release() should be the first called
 	 * in the file cleanup chain.
 	 */
 	eventpoll_release(file);
-
--[[linux-2.6.33/eventpoll_release()]]

 	locks_remove_flock(file);
 
-
--[[linux-2.6.33/locks_remove_flock()]]

 	if (unlikely(file->f_flags & FASYNC)) {
 		if (file->f_op && file->f_op->fasync)
 			file->f_op->fasync(-1, file, 0);
-file->f_op は struct file_operation 型
--[[linux-2.6.33/file_operation]]

 	}
 	if (file->f_op && file->f_op->release)
 		file->f_op->release(inode, file);
 	security_file_free(file);
-
--[[linux-2.6.33/security_file_free()]]

 	ima_file_free(file);
-
--[[linux-2.6.33/ima_file_free()]]

 	if (unlikely(S_ISCHR(inode->i_mode) && inode->i_cdev != NULL))
 		cdev_put(inode->i_cdev);
-
--[[linux-2.6.33/unlikely()]]
-
--[[linux-2.6.33/S_ISCHR()]]
-
--[[linux-2.6.33/cdev_put()]]

 	fops_put(file->f_op);
-
--[[linux-2.6.33/fops_put()]]

 	put_pid(file->f_owner.pid);
-
--[[linux-2.6.33/put_pid()]]

 	file_kill(file);
-
--[[linux-2.6.33/file_kill()]]

 	if (file->f_mode & FMODE_WRITE)
 		drop_file_write_access(file);
-
--[[linux-2.6.33/FMODE_WRITE]]
-
--[[linux-2.6.33/drop_file_write_access()]]

 	file->f_path.dentry = NULL;
 	file->f_path.mnt = NULL;
 	file_free(file);
-
--[[linux-2.6.33/file_free()]]

 	dput(dentry);
-
--[[linux-2.6.33/dput()]]

 	mntput(mnt);
-
--[[linux-2.6.33/mntput()]]

 }


*コメント [#t96ee183]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS