亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? inode.c

?? elinux jffs初始版本 具體了解JFFS的文件系統!
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* *  linux/fs/inode.c * *  Copyright (C) 1991, 1992  Linus Torvalds */#include <linux/stat.h>#include <linux/sched.h>#include <linux/kernel.h>#include <linux/mm.h>#include <linux/string.h>#include <asm/system.h>#define NR_IHASH 512/* * Be VERY careful when you access the inode hash table. There * are some rather scary race conditions you need to take care of: *  - P1 tries to open file "xx", calls "iget()" with the proper *    inode number, but blocks because it's not on the list. *  - P2 deletes file "xx", gets the inode (which P1 has just read, *    but P1 hasn't woken up to the fact yet) *  - P2 iput()'s the inode, which now has i_nlink = 0 *  - P1 wakes up and has the inode, but now P2 has made that *    inode invalid (but P1 has no way of knowing that). * * The "updating" counter makes sure that when P1 blocks on the * iget(), P2 can't delete the inode from under it because P2 * will wait until P1 has been able to update the inode usage * count so that the inode will stay in use until everybody has * closed it.. */static struct inode_hash_entry {	struct inode * inode;	int updating;} hash_table[NR_IHASH];static struct inode * first_inode;static struct wait_queue * inode_wait = NULL;/* Keep these next two contiguous in memory for sysctl.c */int nr_inodes = 0, nr_free_inodes = 0;int max_inodes = NR_INODE;static inline int const hashfn(kdev_t dev, unsigned int i){	return (HASHDEV(dev) ^ i) % NR_IHASH;}static inline struct inode_hash_entry * const hash(kdev_t dev, int i){	return hash_table + hashfn(dev, i);}static inline void insert_inode_free(struct inode *inode){	struct inode * prev, * next = first_inode;	first_inode = inode;	prev = next->i_prev;	inode->i_next = next;	inode->i_prev = prev;	prev->i_next = inode;	next->i_prev = inode;}static inline void remove_inode_free(struct inode *inode){	if (first_inode == inode)		first_inode = first_inode->i_next;	if (inode->i_next)		inode->i_next->i_prev = inode->i_prev;	if (inode->i_prev)		inode->i_prev->i_next = inode->i_next;	inode->i_next = inode->i_prev = NULL;}void insert_inode_hash(struct inode *inode){	struct inode_hash_entry *h;	h = hash(inode->i_dev, inode->i_ino);	inode->i_hash_next = h->inode;	inode->i_hash_prev = NULL;	if (inode->i_hash_next)		inode->i_hash_next->i_hash_prev = inode;	h->inode = inode;}static inline void remove_inode_hash(struct inode *inode){	struct inode_hash_entry *h;	h = hash(inode->i_dev, inode->i_ino);	if (h->inode == inode)		h->inode = inode->i_hash_next;	if (inode->i_hash_next)		inode->i_hash_next->i_hash_prev = inode->i_hash_prev;	if (inode->i_hash_prev)		inode->i_hash_prev->i_hash_next = inode->i_hash_next;	inode->i_hash_prev = inode->i_hash_next = NULL;}static inline void put_last_free(struct inode *inode){	remove_inode_free(inode);	inode->i_prev = first_inode->i_prev;	inode->i_prev->i_next = inode;	inode->i_next = first_inode;	inode->i_next->i_prev = inode;}int grow_inodes(void){	struct inode * inode;	int i;	if (!(inode = (struct inode*) get_free_page(GFP_KERNEL)))		return -ENOMEM;	i=PAGE_SIZE / sizeof(struct inode);	nr_inodes += i;	nr_free_inodes += i;	if (!first_inode)		inode->i_next = inode->i_prev = first_inode = inode++, i--;	for ( ; i ; i-- )		insert_inode_free(inode++);	return 0;}unsigned long inode_init(unsigned long start, unsigned long end){	memset(hash_table, 0, sizeof(hash_table));	first_inode = NULL;	return start;}static void __wait_on_inode(struct inode *);static inline void wait_on_inode(struct inode * inode){	if (inode->i_lock)		__wait_on_inode(inode);}static inline void lock_inode(struct inode * inode){	wait_on_inode(inode);	inode->i_lock = 1;}static inline void unlock_inode(struct inode * inode){	inode->i_lock = 0;	wake_up(&inode->i_wait);}/* * Note that we don't want to disturb any wait-queues when we discard * an inode. * * Argghh. Got bitten by a gcc problem with inlining: no way to tell * the compiler that the inline asm function 'memset' changes 'inode'. * I've been searching for the bug for days, and was getting desperate. * Finally looked at the assembler output... Grrr. * * The solution is the weird use of 'volatile'. Ho humm. Have to report * it to the gcc lists, and hope we can do this more cleanly some day.. */void clear_inode(struct inode * inode){	struct wait_queue * wait;	/*	 * We can clear inodes either when a last deref to the inode 	 * causes it to be deleted (reference count==1), or when we want to 	 * reuse it (reference count==0).  Any other count is an error.	 */	if (inode->i_count > 1)		panic ("clear_inode: Inode still has references");	/*	 * We are about to zap this inode.  This operation may block,	 * and it's imperative that we don't allow another process to	 * grab it before it is completely pulled down.  The i_count	 * will prevent reuse of the inode by get_empty_inode(), but the	 * i_condemned flag will also prevent __iget() from finding the	 * inode until it is completely dead. 	 */	inode->i_condemned = 1;	inode->i_count++;		truncate_inode_pages(inode, 0);	wait_on_inode(inode);	if (IS_WRITABLE(inode)) {		if (inode->i_sb && inode->i_sb->dq_op)			inode->i_sb->dq_op->drop(inode);	}	remove_inode_hash(inode);	remove_inode_free(inode);	wait = ((volatile struct inode *) inode)->i_wait;	if (--inode->i_count)		nr_free_inodes++;	memset(inode,0,sizeof(*inode));	((volatile struct inode *) inode)->i_wait = wait;	insert_inode_free(inode);	/*	 * The inode is now reusable again, and the condemned flag is	 * clear.  Wake up anybody who is waiting on the condemned flag. 	 */	wake_up(&inode->i_wait);}int fs_may_mount(kdev_t dev){	struct inode * inode, * next;	int i;	next = first_inode;	for (i = nr_inodes ; i > 0 ; i--) {		inode = next;		next = inode->i_next;	/* clear_inode() changes the queues.. */		if (inode->i_dev != dev)			continue;		if (inode->i_count || inode->i_dirt || inode->i_lock)			return 0;		clear_inode(inode);	}	return 1;}int fs_may_umount(kdev_t dev, struct inode * mount_root){	struct inode * inode;	int i;	inode = first_inode;	for (i=0 ; i < nr_inodes ; i++, inode = inode->i_next) {		if (inode->i_dev != dev || !inode->i_count)			continue;		if (inode == mount_root && inode->i_count ==		    (inode->i_mount != inode ? 1 : 2))			continue;		return 0;	}	return 1;}int fs_may_remount_ro(kdev_t dev){	struct file * file;	int i;	/* Check that no files are currently opened for writing. */	for (file = first_file, i=0; i<nr_files; i++, file=file->f_next) {		if (!file->f_count || !file->f_inode ||		    file->f_inode->i_dev != dev)			continue;		if (S_ISREG(file->f_inode->i_mode) && (file->f_mode & 2))			return 0;	}	return 1;}static void write_inode(struct inode * inode){	if (!inode->i_dirt)		return;	wait_on_inode(inode);	if (!inode->i_dirt)		return;	if (!inode->i_sb || !inode->i_sb->s_op || !inode->i_sb->s_op->write_inode) {		inode->i_dirt = 0;		return;	}	inode->i_lock = 1;		inode->i_sb->s_op->write_inode(inode);	unlock_inode(inode);}static inline void read_inode(struct inode * inode){	lock_inode(inode);	if (inode->i_sb && inode->i_sb->s_op && inode->i_sb->s_op->read_inode)		inode->i_sb->s_op->read_inode(inode);	unlock_inode(inode);}/* POSIX UID/GID verification for setting inode attributes */int inode_change_ok(struct inode *inode, struct iattr *attr){	/*	 *	If force is set do it anyway.	 */	 	if (attr->ia_valid & ATTR_FORCE)		return 0;	/* Make sure a caller can chown */	if ((attr->ia_valid & ATTR_UID) &&	    (current->fsuid != inode->i_uid ||	     attr->ia_uid != inode->i_uid) && !fsuser())		return -EPERM;	/* Make sure caller can chgrp */	if ((attr->ia_valid & ATTR_GID) &&	    (!in_group_p(attr->ia_gid) && attr->ia_gid != inode->i_gid) &&	    !fsuser())		return -EPERM;	/* Make sure a caller can chmod */	if (attr->ia_valid & ATTR_MODE) {		if ((current->fsuid != inode->i_uid) && !fsuser())			return -EPERM;		/* Also check the setgid bit! */		if (!fsuser() && !in_group_p((attr->ia_valid & ATTR_GID) ? attr->ia_gid :					     inode->i_gid))			attr->ia_mode &= ~S_ISGID;	}	/* Check for setting the inode time */	if ((attr->ia_valid & ATTR_ATIME_SET) &&	    ((current->fsuid != inode->i_uid) && !fsuser()))		return -EPERM;	if ((attr->ia_valid & ATTR_MTIME_SET) &&	    ((current->fsuid != inode->i_uid) && !fsuser()))		return -EPERM;	return 0;}/* * Set the appropriate attributes from an attribute structure into * the inode structure. */void inode_setattr(struct inode *inode, struct iattr *attr){	if (attr->ia_valid & ATTR_UID)		inode->i_uid = attr->ia_uid;	if (attr->ia_valid & ATTR_GID)		inode->i_gid = attr->ia_gid;	if (attr->ia_valid & ATTR_SIZE)		inode->i_size = attr->ia_size;	if (attr->ia_valid & ATTR_ATIME)		inode->i_atime = attr->ia_atime;	if (attr->ia_valid & ATTR_MTIME)		inode->i_mtime = attr->ia_mtime;	if (attr->ia_valid & ATTR_CTIME)

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91美女片黄在线观看| 日本韩国欧美在线| 免费久久99精品国产| 亚洲高清三级视频| 午夜精品久久久久久久99樱桃| 亚洲一区二区三区四区在线观看 | 亚洲高清中文字幕| 亚洲国产日韩精品| 日本午夜一区二区| 国产制服丝袜一区| av一二三不卡影片| 色狠狠色噜噜噜综合网| 欧美午夜精品一区二区三区 | 久久精品国产第一区二区三区| 免费人成在线不卡| 韩国v欧美v日本v亚洲v| 成人黄色在线视频| 在线观看视频91| 欧美一二三在线| 国产蜜臀97一区二区三区| 亚洲乱码精品一二三四区日韩在线| 亚洲日本电影在线| 日本欧美一区二区三区| 国产另类ts人妖一区二区| proumb性欧美在线观看| 欧美欧美欧美欧美首页| 国产亚洲va综合人人澡精品| 一区2区3区在线看| 国内精品国产成人| 欧美亚洲综合色| 精品国产免费一区二区三区四区| 国产精品传媒入口麻豆| 五月婷婷激情综合| 成人在线视频一区二区| 欧美高清视频一二三区 | 欧美午夜在线一二页| 欧美精品亚洲一区二区在线播放| 精品国产伦一区二区三区观看方式 | 久久9热精品视频| heyzo一本久久综合| 日韩三级中文字幕| 国产精品沙发午睡系列990531| 亚洲综合图片区| 国产宾馆实践打屁股91| 欧美人妇做爰xxxⅹ性高电影| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 精品国产成人在线影院| av激情亚洲男人天堂| 激情综合色播激情啊| 亚洲狼人国产精品| 石原莉奈一区二区三区在线观看 | 一本色道亚洲精品aⅴ| 久久久一区二区| 麻豆一区二区在线| 欧美日韩国产综合一区二区| 成人激情动漫在线观看| 亚洲电影一区二区三区| 亚洲精品国产一区二区精华液 | 一区二区三区中文在线观看| 色久综合一二码| 免费日韩伦理电影| 国产精品色噜噜| 911精品产国品一二三产区| 国产一二精品视频| 亚洲国产精品久久人人爱蜜臀| 日韩精品一区二区在线| 91视视频在线观看入口直接观看www| 亚洲国产视频在线| 国产视频一区在线播放| 欧美色大人视频| 成人免费观看视频| 日本91福利区| 一区二区三区在线观看国产| 精品国产乱码久久久久久夜甘婷婷 | 久久成人综合网| 一区二区三区在线免费播放| 久久综合九色综合久久久精品综合| 在线免费av一区| 国产成人午夜高潮毛片| 午夜精品久久久久久久久久久| 中文字幕精品三区| 精品嫩草影院久久| 色婷婷国产精品| 国产成人午夜电影网| 欧美aaa在线| 亚洲福利视频一区| 国产精品成人一区二区艾草 | 99久久精品国产一区二区三区 | 精品国产精品网麻豆系列| 在线欧美小视频| 不卡av免费在线观看| 国产麻豆精品95视频| 奇米色777欧美一区二区| 亚洲国产精品久久艾草纯爱| 国产精品国产自产拍在线| 2023国产精华国产精品| 欧美日韩你懂的| 在线中文字幕一区二区| eeuss国产一区二区三区| 国产成人精品在线看| 国内精品视频666| 韩国女主播一区二区三区| 日本大胆欧美人术艺术动态| 天堂成人国产精品一区| 亚洲成人www| 五月天一区二区| 国产成人一区在线| 国产成a人亚洲精| 国产成人啪免费观看软件| 国产老妇另类xxxxx| 精品一区二区在线视频| 精品一区二区三区久久| 国产精品亚洲综合一区在线观看| 国产一区在线不卡| 国产成人精品在线看| 懂色av一区二区三区蜜臀| 国产69精品一区二区亚洲孕妇| 国产一区二区美女诱惑| 成人午夜在线播放| 91视频在线观看| 欧美日韩免费观看一区三区| 欧美日韩极品在线观看一区| 欧美一区二区三区男人的天堂| 日韩美女主播在线视频一区二区三区| 日韩欧美在线影院| 久久久久综合网| 国产精品国产a级| 亚洲精品videosex极品| 日韩精品三区四区| 韩国三级中文字幕hd久久精品| 国产成人日日夜夜| 91麻豆产精品久久久久久| 欧美视频在线播放| 精品理论电影在线| 国产精品全国免费观看高清 | 在线欧美小视频| 欧美精品一二三区| 久久久久9999亚洲精品| 亚洲桃色在线一区| 蜜臀va亚洲va欧美va天堂| 国产福利不卡视频| 欧美在线色视频| 久久香蕉国产线看观看99| 国产精品久久久久aaaa| 亚洲mv在线观看| 国精品**一区二区三区在线蜜桃| 91丨porny丨中文| 欧美一二三区在线观看| 亚洲国产精华液网站w | 欧美亚洲综合在线| 久久久久久久久99精品| 亚洲一区二区三区美女| 九九热在线视频观看这里只有精品| 不卡大黄网站免费看| 欧美片在线播放| 国产精品美女久久久久久2018| 午夜精品在线看| 99精品在线观看视频| 精品国产污网站| 午夜成人免费视频| 丁香亚洲综合激情啪啪综合| 欧美疯狂性受xxxxx喷水图片| 欧美极品美女视频| 久久国产日韩欧美精品| 色视频一区二区| 国产精品欧美一级免费| 日本强好片久久久久久aaa| 一本色道久久综合狠狠躁的推荐| 精品sm捆绑视频| 日韩精彩视频在线观看| 99久久精品国产毛片| 久久久亚洲高清| 美腿丝袜亚洲一区| 欧美美女bb生活片| 亚洲视频一区在线观看| 国产成人99久久亚洲综合精品| 日韩视频一区在线观看| 天天综合天天综合色| 91视频免费观看| 国产精品国产三级国产aⅴ无密码| 黄网站免费久久| 欧美一级片在线看| 日日骚欧美日韩| 欧美日韩精品一区二区三区四区| 亚洲色图欧美在线| 99精品欧美一区二区蜜桃免费| 国产午夜精品美女毛片视频| 久久99国产精品尤物| 91精品国产高清一区二区三区蜜臀| 亚洲黄色在线视频| 色综合咪咪久久| 一区二区欧美视频| 91福利视频久久久久| 亚洲一区二区在线免费观看视频| 色综合久久天天综合网| 亚洲精品乱码久久久久久| 色综合色综合色综合色综合色综合 | 在线观看91av| 日韩电影在线一区| 精品久久久久久久久久久久久久久 |