From e7ec952f6aa6ac1649ac49eb5e4de5b92c829d1e Mon Sep 17 00:00:00 2001 From: Al Viro Date: Tue, 16 Jun 2009 23:35:46 -0400 Subject: get rid of BKL in fs/efs Only readdir() really needed it, and that's easily fixable by switch to generic_file_llseek() Signed-off-by: Al Viro --- fs/efs/dir.c | 5 +---- fs/efs/namei.c | 9 +-------- fs/efs/symlink.c | 7 +------ 3 files changed, 3 insertions(+), 18 deletions(-) (limited to 'fs/efs') diff --git a/fs/efs/dir.c b/fs/efs/dir.c index 49308a29798a..7ee6f7e3a608 100644 --- a/fs/efs/dir.c +++ b/fs/efs/dir.c @@ -5,12 +5,12 @@ */ #include -#include #include "efs.h" static int efs_readdir(struct file *, void *, filldir_t); const struct file_operations efs_dir_operations = { + .llseek = generic_file_llseek, .read = generic_read_dir, .readdir = efs_readdir, }; @@ -33,8 +33,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { if (inode->i_size & (EFS_DIRBSIZE-1)) printk(KERN_WARNING "EFS: WARNING: readdir(): directory size not a multiple of EFS_DIRBSIZE\n"); - lock_kernel(); - /* work out where this entry can be found */ block = filp->f_pos >> EFS_DIRBSIZE_BITS; @@ -107,7 +105,6 @@ static int efs_readdir(struct file *filp, void *dirent, filldir_t filldir) { filp->f_pos = (block << EFS_DIRBSIZE_BITS) | slot; out: - unlock_kernel(); return 0; } diff --git a/fs/efs/namei.c b/fs/efs/namei.c index c3fb5f9c4a44..1511bf9e5f80 100644 --- a/fs/efs/namei.c +++ b/fs/efs/namei.c @@ -8,7 +8,6 @@ #include #include -#include #include #include "efs.h" @@ -63,16 +62,12 @@ struct dentry *efs_lookup(struct inode *dir, struct dentry *dentry, struct namei efs_ino_t inodenum; struct inode * inode = NULL; - lock_kernel(); inodenum = efs_find_entry(dir, dentry->d_name.name, dentry->d_name.len); if (inodenum) { inode = efs_iget(dir->i_sb, inodenum); - if (IS_ERR(inode)) { - unlock_kernel(); + if (IS_ERR(inode)) return ERR_CAST(inode); - } } - unlock_kernel(); return d_splice_alias(inode, dentry); } @@ -115,11 +110,9 @@ struct dentry *efs_get_parent(struct dentry *child) struct dentry *parent = ERR_PTR(-ENOENT); efs_ino_t ino; - lock_kernel(); ino = efs_find_entry(child->d_inode, "..", 2); if (ino) parent = d_obtain_alias(efs_iget(child->d_inode->i_sb, ino)); - unlock_kernel(); return parent; } diff --git a/fs/efs/symlink.c b/fs/efs/symlink.c index 41911ec83aaf..75117d0dac2b 100644 --- a/fs/efs/symlink.c +++ b/fs/efs/symlink.c @@ -9,7 +9,6 @@ #include #include #include -#include #include "efs.h" static int efs_symlink_readpage(struct file *file, struct page *page) @@ -22,9 +21,8 @@ static int efs_symlink_readpage(struct file *file, struct page *page) err = -ENAMETOOLONG; if (size > 2 * EFS_BLOCKSIZE) - goto fail_notlocked; + goto fail; - lock_kernel(); /* read first 512 bytes of link target */ err = -EIO; bh = sb_bread(inode->i_sb, efs_bmap(inode, 0)); @@ -40,14 +38,11 @@ static int efs_symlink_readpage(struct file *file, struct page *page) brelse(bh); } link[size] = '\0'; - unlock_kernel(); SetPageUptodate(page); kunmap(page); unlock_page(page); return 0; fail: - unlock_kernel(); -fail_notlocked: SetPageError(page); kunmap(page); unlock_page(page); -- cgit v1.2.3 ion> Unnamed repository; edit this file to name it for gitweb.root
summaryrefslogtreecommitdiff
AgeCommit message (Expand)AuthorFilesLines
2014-03-12Version 4.2.3.1, tag libreoffice-4.2.3.1libreoffice-4.2.3.1Christian Lohmaier0-0/+0
2014-03-12Branch libreoffice-4-2-3Christian Lohmaier0-0/+0
2014-03-11update for 4.2.3 rc1Christian Lohmaier1137-21460/+82901
2014-02-21typo fixes in xml tags (also fixed in Pootle)Andras Timar2-2/+2
2014-02-12update translations for 4.2.1 rc1Christian Lohmaier3160-119336/+266940
2014-02-02updated Slovenian translationAndras Timar15-45/+1971
2014-01-30fdo#74119 fix unlocalized redline menuAndras Timar112-896/+896
2014-01-17updated Slovenian translationAndras Timar10-327/+364
2014-01-11Updated Serbian translation (pomigrate2)Andras Timar600-53085/+70756
2014-01-07update translations for 4.2.0rc2Christian Lohmaier4214-101185/+432052
2014-01-07updated Slovenian translationAndras Timar11-55/+64
2013-12-30updated Slovenian translationAndras Timar19-89/+1898
2013-12-17update translations for 4.2.0rc1Christian Lohmaier2032-138450/+90097
2013-12-14updated Slovenian translationAndras Timar28-242/+285
2013-12-03update translations for 4.2.0 Beta2Christian Lohmaier12941-2727950/+2678643
2013-12-01updated Slovenian translationAndras Timar36-248/+661
2013-12-01updated Slovenian translationAndras Timar13-80/+46
2013-11-25updated Slovenian translationAndras Timar352-1457/+2281
2013-11-21Branch libreoffice-4-2Christian Lohmaier0-0/+0
2013-11-21sync with po-templates for 4.2libreoffice-4-2-branch-pointChristian Lohmaier21990-1056423/+1547142
2013-11-18renamed ku* to kmr-Latn*, fdo#63460Eike Rathke309-0/+0
2013-11-18updated Slovenian translationAndras Timar77-1277/+2390
2013-11-17remove Android Impress Remote translationsAndras Timar113-52802/+0
2013-11-17Bugzilla Migration: Change bugs.freedesktop.org -> bugs.libreoffice.orgRobinson Tryon1-1/+1
2013-11-15updated Slovenian translationAndras Timar136-27719/+32461
2013-10-08rbhz#1015004 fix caseDavid Tardon1-1/+1
2013-09-10renamed 'sh' to 'sr-Latn'Eike Rathke309-0/+0
2013-09-04renamed translations/source/ca-XV to translations/sourcei/ca-valenciaEike Rathke363-0/+0
2013-08-28Resolves: rhbz#1000692 mistranslation in de if opening Format->AbsatzCaolán McNamara1-1/+1
2013-07-25fdo#67093 Change traduction of Header in it to avoid conflict with HeadingArnaud Versini1-1/+1
2013-07-22fdo#67093 Change traduction of Title for some more languagesChristian Lohmaier13-13/+13
2013-07-20fdo#67093 Change traduction of Title in french to avoid conflict with Heading.Arnaud Versini1-1/+1
2013-06-27sync libreoffice-4-1 and masterAndras Timar6-20/+110
2013-06-27invalid xmlAndras Timar1-1/+1
2013-06-27update Sidama translationAndras Timar306-22257/+25925
2013-06-27buildfixAndras Timar1-1/+1
2013-06-27update translations for LibreOffice 4.1 rc1Andras Timar3938-72954/+79793
2013-06-27updated Slovenian translationAndras Timar21-58/+186
2013-06-15typo/help l10n extraction errorAndras Timar57-121/+121
2013-06-13parser error : EntityRef: expectingCaolán McNamara1-4/+4
2013-06-12fdo#65512 fix missing imagesAndras Timar342-973/+973
2013-06-12updated Slovenian translationAndras Timar32-289/+193
2013-06-12missing | cause Windows installer error 2870Andras Timar10-22/+22
2013-06-11fdo#65214 missing | cause Windows installer error 2870Andras Timar1-1/+1
2013-06-11fdo#65483 fix po filesAndras Timar614-139655/+6394
2013-06-05update translations for LibreOffice 4.1 beta2Andras Timar351-3667/+4053
2013-06-05update translations for LibreOffice 4.1 beta2Andras Timar