namei.c (ef6078930263bfcdcfe4dddb2cd85254b4cf4f5c) | namei.c (0562e0bad483d10e9651fbb8f21dc3d0bad57374) |
---|---|
1/* 2 * linux/fs/ext4/namei.c 3 * 4 * Copyright (C) 1992, 1993, 1994, 1995 5 * Remy Card (card@masi.ibp.fr) 6 * Laboratoire MASI - Institut Blaise Pascal 7 * Universite Pierre et Marie Curie (Paris VI) 8 * --- 26 unchanged lines hidden (view full) --- 35#include <linux/buffer_head.h> 36#include <linux/bio.h> 37#include "ext4.h" 38#include "ext4_jbd2.h" 39 40#include "xattr.h" 41#include "acl.h" 42 | 1/* 2 * linux/fs/ext4/namei.c 3 * 4 * Copyright (C) 1992, 1993, 1994, 1995 5 * Remy Card (card@masi.ibp.fr) 6 * Laboratoire MASI - Institut Blaise Pascal 7 * Universite Pierre et Marie Curie (Paris VI) 8 * --- 26 unchanged lines hidden (view full) --- 35#include <linux/buffer_head.h> 36#include <linux/bio.h> 37#include "ext4.h" 38#include "ext4_jbd2.h" 39 40#include "xattr.h" 41#include "acl.h" 42 |
43#include <trace/events/ext4.h> |
|
43/* 44 * define how far ahead to read directories while searching them. 45 */ 46#define NAMEI_RA_CHUNKS 2 47#define NAMEI_RA_BLOCKS 4 48#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) 49#define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b)) 50 --- 2127 unchanged lines hidden (view full) --- 2178static int ext4_unlink(struct inode *dir, struct dentry *dentry) 2179{ 2180 int retval; 2181 struct inode *inode; 2182 struct buffer_head *bh; 2183 struct ext4_dir_entry_2 *de; 2184 handle_t *handle; 2185 | 44/* 45 * define how far ahead to read directories while searching them. 46 */ 47#define NAMEI_RA_CHUNKS 2 48#define NAMEI_RA_BLOCKS 4 49#define NAMEI_RA_SIZE (NAMEI_RA_CHUNKS * NAMEI_RA_BLOCKS) 50#define NAMEI_RA_INDEX(c,b) (((c) * NAMEI_RA_BLOCKS) + (b)) 51 --- 2127 unchanged lines hidden (view full) --- 2179static int ext4_unlink(struct inode *dir, struct dentry *dentry) 2180{ 2181 int retval; 2182 struct inode *inode; 2183 struct buffer_head *bh; 2184 struct ext4_dir_entry_2 *de; 2185 handle_t *handle; 2186 |
2187 trace_ext4_unlink_enter(dir, dentry); |
|
2186 /* Initialize quotas before so that eventual writes go 2187 * in separate transaction */ 2188 dquot_initialize(dir); 2189 dquot_initialize(dentry->d_inode); 2190 2191 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); 2192 if (IS_ERR(handle)) 2193 return PTR_ERR(handle); --- 29 unchanged lines hidden (view full) --- 2223 ext4_orphan_add(handle, inode); 2224 inode->i_ctime = ext4_current_time(inode); 2225 ext4_mark_inode_dirty(handle, inode); 2226 retval = 0; 2227 2228end_unlink: 2229 ext4_journal_stop(handle); 2230 brelse(bh); | 2188 /* Initialize quotas before so that eventual writes go 2189 * in separate transaction */ 2190 dquot_initialize(dir); 2191 dquot_initialize(dentry->d_inode); 2192 2193 handle = ext4_journal_start(dir, EXT4_DELETE_TRANS_BLOCKS(dir->i_sb)); 2194 if (IS_ERR(handle)) 2195 return PTR_ERR(handle); --- 29 unchanged lines hidden (view full) --- 2225 ext4_orphan_add(handle, inode); 2226 inode->i_ctime = ext4_current_time(inode); 2227 ext4_mark_inode_dirty(handle, inode); 2228 retval = 0; 2229 2230end_unlink: 2231 ext4_journal_stop(handle); 2232 brelse(bh); |
2233 trace_ext4_unlink_exit(dentry, retval); |
|
2231 return retval; 2232} 2233 2234static int ext4_symlink(struct inode *dir, 2235 struct dentry *dentry, const char *symname) 2236{ 2237 handle_t *handle; 2238 struct inode *inode; --- 320 unchanged lines hidden --- | 2234 return retval; 2235} 2236 2237static int ext4_symlink(struct inode *dir, 2238 struct dentry *dentry, const char *symname) 2239{ 2240 handle_t *handle; 2241 struct inode *inode; --- 320 unchanged lines hidden --- |