linux-2.6.33/__fput()
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
検索
|
最終更新
|
ヘルプ
|
ログイン
]
開始行:
*参照元 [#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 completio...
* 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...
* 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 !=...
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]
終了行:
*参照元 [#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 completio...
* 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...
* 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 !=...
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]
ページ名: