/// Remove an open coded simple_open() function /// and replace file operations references to the function /// with simple_open() instead. /// // Confidence: High // Comments: // Options: --no-includes --include-headers virtual patch virtual report @ open depends on patch @ identifier open_f != simple_open; identifier i, f; @@ -int open_f(struct inode *i, struct file *f) -{ ( -if (i->i_private) -f->private_data = i->i_private; | -f->private_data = i->i_private; ) -return 0; -} @ has_open depends on open @ identifier fops; identifier open.open_f; @@ struct file_operations fops = { ..., -.open = open_f, +.open = simple_open, ... }; @ openr depends on report @ identifier open_f != simple_open; identifier i, f; position p; @@ int open_f@p(struct inode *i, struct file *f) { ( if (i->i_private) f->private_data = i->i_private; | f->private_data = i->i_private; ) return 0; } @ has_openr depends on openr @ identifier fops; identifier openr.open_f; position p; @@ struct file_operations fops = { ..., .open = open_f@p, ... }; @script:python@ pf << openr.p; ps << has_openr.p; @@ coccilib.report.print_report(pf[0],"WARNING opportunity for simple_open, see also structure on line %s"%(ps[0].line)) tion> net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/tools/perf/arch/alpha
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2016-10-21 11:33:49 +0200
committerDan Williams <dan.j.williams@intel.com>2016-12-26 20:29:25 -0800
commit1db175428ee374489448361213e9c3b749d14900 (patch)
tree32e4eebdad84d1c6e84508186b0f1fb63df7bdfc /tools/perf/arch/alpha
parent9f141d6ef6258a3a37a045842d9ba7e68f368956 (diff)
ext4: Simplify DAX fault path
Now that dax_iomap_fault() calls ->iomap_begin() without entry lock, we can use transaction starting in ext4_iomap_begin() and thus simplify ext4_dax_fault(). It also provides us proper retries in case of ENOSPC. Signed-off-by: Jan Kara <jack@suse.cz> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'tools/perf/arch/alpha')