From 200212cdbf5facbc720c976ec711f7b423496972 Mon Sep 17 00:00:00 2001 From: Jonathan Corbet Date: Thu, 29 May 2008 17:14:05 -0600 Subject: [PATCH] --- yaml --- r: 100395 b: refs/heads/master c: 9c20616c385ebeaa30257ef5d35e8f346db4ee32 h: refs/heads/master i: 100393: a74b79a2935ddc3e88c467bda1bde9dd8de84f2b 100391: c98df667d1372ebe0c6862a7ba27672be118af5a v: v3 --- [refs] | 2 +- trunk/fs/fat/file.c | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/[refs] b/[refs] index 5b3a5092da63..ec01ef5d6c1e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 38c4c97c62a30aef276663c1128a2051a25ead7d +refs/heads/master: 9c20616c385ebeaa30257ef5d35e8f346db4ee32 diff --git a/trunk/fs/fat/file.c b/trunk/fs/fat/file.c index 7059928fb351..bdf91e97397d 100644 --- a/trunk/fs/fat/file.c +++ b/trunk/fs/fat/file.c @@ -11,7 +11,6 @@ #include #include #include -#include #include #include #include @@ -229,8 +228,7 @@ static int fat_free(struct inode *inode, int skip) void fat_truncate(struct inode *inode) { - struct super_block *sb = inode->i_sb; - struct msdos_sb_info *sbi = MSDOS_SB(sb); + struct msdos_sb_info *sbi = MSDOS_SB(inode->i_sb); const unsigned int cluster_size = sbi->cluster_size; int nr_clusters; @@ -243,9 +241,7 @@ void fat_truncate(struct inode *inode) nr_clusters = (inode->i_size + (cluster_size - 1)) >> sbi->cluster_bits; - lock_super(sb); fat_free(inode, nr_clusters); - unlock_super(sb); fat_flush_inodes(inode->i_sb, inode, NULL); } @@ -298,14 +294,11 @@ static int fat_allow_set_time(struct msdos_sb_info *sbi, struct inode *inode) int fat_setattr(struct dentry *dentry, struct iattr *attr) { - struct super_block *sb = dentry->d_sb; struct msdos_sb_info *sbi = MSDOS_SB(dentry->d_sb); struct inode *inode = dentry->d_inode; int mask, error = 0; unsigned int ia_valid; - lock_super(sb); - /* * Expand the file. Since inode_setattr() updates ->i_size * before calling the ->truncate(), but FAT needs to fill the @@ -358,7 +351,6 @@ int fat_setattr(struct dentry *dentry, struct iattr *attr) mask = sbi->options.fs_fmask; inode->i_mode &= S_IFMT | (S_IRWXUGO & ~mask); out: - unlock_super(sb); return error; } EXPORT_SYMBOL_GPL(fat_setattr);