CIFS: Do not permit write to a range mandatory locked with a read lock
[firefly-linux-kernel-4.4.55.git] / fs / sysv / inode.c
index d33e506c1eacabcebfd354f6ceedf52a3111a6d7..c327d4ee1235494e05ae1587b86ca357577b2292 100644 (file)
@@ -36,7 +36,7 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
        struct sysv_sb_info *sbi = SYSV_SB(sb);
        unsigned long time = get_seconds(), old_time;
 
-       lock_super(sb);
+       mutex_lock(&sbi->s_lock);
 
        /*
         * If we are going to write out the super block,
@@ -51,7 +51,7 @@ static int sysv_sync_fs(struct super_block *sb, int wait)
                mark_buffer_dirty(sbi->s_bh2);
        }
 
-       unlock_super(sb);
+       mutex_unlock(&sbi->s_lock);
 
        return 0;
 }