inode.c (a11b9f65eae766b17ec3451a6a1766f0a9d1dbff) | inode.c (7c45729a4d6d1c90879e6c5c2df325c2f6db7191) |
---|---|
1/* 2 * fs/f2fs/inode.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 5 unchanged lines hidden (view full) --- 14#include <linux/backing-dev.h> 15#include <linux/writeback.h> 16 17#include "f2fs.h" 18#include "node.h" 19 20#include <trace/events/f2fs.h> 21 | 1/* 2 * fs/f2fs/inode.c 3 * 4 * Copyright (c) 2012 Samsung Electronics Co., Ltd. 5 * http://www.samsung.com/ 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License version 2 as --- 5 unchanged lines hidden (view full) --- 14#include <linux/backing-dev.h> 15#include <linux/writeback.h> 16 17#include "f2fs.h" 18#include "node.h" 19 20#include <trace/events/f2fs.h> 21 |
22void f2fs_mark_inode_dirty_sync(struct inode *inode) | 22void f2fs_mark_inode_dirty_sync(struct inode *inode, bool sync) |
23{ | 23{ |
24 if (f2fs_inode_dirtied(inode)) | 24 if (f2fs_inode_dirtied(inode, sync)) |
25 return; | 25 return; |
26 |
|
26 mark_inode_dirty_sync(inode); 27} 28 29void f2fs_set_inode_flags(struct inode *inode) 30{ 31 unsigned int flags = F2FS_I(inode)->i_flags; 32 unsigned int new_fl = 0; 33 --- 4 unchanged lines hidden (view full) --- 38 if (flags & FS_IMMUTABLE_FL) 39 new_fl |= S_IMMUTABLE; 40 if (flags & FS_NOATIME_FL) 41 new_fl |= S_NOATIME; 42 if (flags & FS_DIRSYNC_FL) 43 new_fl |= S_DIRSYNC; 44 inode_set_flags(inode, new_fl, 45 S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); | 27 mark_inode_dirty_sync(inode); 28} 29 30void f2fs_set_inode_flags(struct inode *inode) 31{ 32 unsigned int flags = F2FS_I(inode)->i_flags; 33 unsigned int new_fl = 0; 34 --- 4 unchanged lines hidden (view full) --- 39 if (flags & FS_IMMUTABLE_FL) 40 new_fl |= S_IMMUTABLE; 41 if (flags & FS_NOATIME_FL) 42 new_fl |= S_NOATIME; 43 if (flags & FS_DIRSYNC_FL) 44 new_fl |= S_DIRSYNC; 45 inode_set_flags(inode, new_fl, 46 S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); |
46 f2fs_mark_inode_dirty_sync(inode); | 47 f2fs_mark_inode_dirty_sync(inode, false); |
47} 48 49static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) 50{ 51 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || 52 S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { 53 if (ri->i_addr[0]) 54 inode->i_rdev = --- 418 unchanged lines hidden --- | 48} 49 50static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri) 51{ 52 if (S_ISCHR(inode->i_mode) || S_ISBLK(inode->i_mode) || 53 S_ISFIFO(inode->i_mode) || S_ISSOCK(inode->i_mode)) { 54 if (ri->i_addr[0]) 55 inode->i_rdev = --- 418 unchanged lines hidden --- |